1
0
Fork 0
mirror of https://github.com/thoughtbot/shoulda-matchers.git synced 2022-11-09 12:01:38 -05:00

Added a test for the model_class private helper

This commit is contained in:
Ryan McGeary 2008-07-28 12:26:13 -04:00
parent cc61627a52
commit 8fb6041b61

View file

@ -9,7 +9,7 @@ class PrivateHelpersTest < Test::Unit::TestCase # :nodoc:
assert_equal [:a, :b], args
end
should "return wanted opts in order" do
should "return wanted opts in order" do
args = [{:one => 1, :two => 2}]
one, two = get_options!(args, :one, :two)
assert_equal 1, one
@ -23,4 +23,12 @@ class PrivateHelpersTest < Test::Unit::TestCase # :nodoc:
end
end
end
class ::SomeModel; end
context "model_class" do
should "sniff the class constant from the test class" do
self.expects(:name).returns("SomeModelTest")
assert_equal SomeModel, model_class
end
end
end