test/mock_test.rb in neo-rails-0.0.6 vs test/mock_test.rb in neo-rails-0.0.7
- old
+ new
@@ -28,6 +28,23 @@
test "is not mock_tagged?" do
refute mock.mock.tagged?(:foo)
refute mock.mock.tagged?(:bar)
end
end
+
+ context :options do
+ let(:mock) { Neo::Rails::Mock.new(:tag, :opt => true, "string" => :yes) }
+
+ test "passes options" do
+ assert_equal true, mock.mock.option(:opt)
+ assert_equal :yes, mock.mock.option("string")
+
+ refute mock.mock.option("opt")
+ refute mock.mock.option(:unknown)
+ end
+
+ test "is tagged" do
+ assert mock.mock.tagged?(:tag)
+ assert_equal "Tag", mock.mock.description
+ end
+ end
end