|
99 | 99 |
|
100 | 100 | subject.expose :birthday, :format_with => :timestamp |
101 | 101 |
|
102 | | - model = { :birthday => Time.new(2012, 2, 27) } |
| 102 | + model = { :birthday => Time.gm(2012, 2, 27) } |
103 | 103 | subject.new(mock(model)).as_json[:birthday].should == '02/27/2012' |
104 | 104 | end |
105 | 105 | end |
|
239 | 239 | let(:attributes){ { |
240 | 240 | :name => 'Bob Bobson', |
241 | 241 | |
242 | | - :birthday => Time.new(2012, 2, 27), |
| 242 | + :birthday => Time.gm(2012, 2, 27), |
243 | 243 | :fantasies => ['Unicorns', 'Double Rainbows', 'Nessy'], |
244 | 244 | :friends => [ |
245 | | - mock(:name => "Friend 1", :email => '[email protected]', :fantasies => [], :birthday => Time.new(2012, 2, 27), :friends => []), |
246 | | - mock(:name => "Friend 2", :email => '[email protected]', :fantasies => [], :birthday => Time.new(2012, 2, 27), :friends => []) |
| 245 | + mock(:name => "Friend 1", :email => '[email protected]', :fantasies => [], :birthday => Time.gm(2012, 2, 27), :friends => []), |
| 246 | + mock(:name => "Friend 2", :email => '[email protected]', :fantasies => [], :birthday => Time.gm(2012, 2, 27), :friends => []) |
247 | 247 | ] |
248 | 248 | } } |
249 | 249 | subject{ fresh_class.new(model) } |
|
0 commit comments