Skip to content

Commit

Permalink
Merge pull request rails#8917 from adomokos/adding_more_tests_to_acti…
Browse files Browse the repository at this point in the history
…vemodel_model

Adding tests for ActiveModel::Model
  • Loading branch information
rafaelfranca committed Jan 14, 2013
2 parents 2d35e58 + 01434a5 commit 9b84dd4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions activemodel/test/cases/model_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ def test_initialize_with_params
def test_initialize_with_nil_or_empty_hash_params_does_not_explode
assert_nothing_raised do
BasicModel.new()
BasicModel.new nil
BasicModel.new({})
end
end

def test_persisted_is_always_false
object = BasicModel.new(:attr => "value")
assert object.persisted? == false
end
end

0 comments on commit 9b84dd4

Please sign in to comment.