search for: import_lin

Displaying 1 result from an estimated 1 matches for "import_lin".

Did you mean: import_line
2006 Aug 17
1
expectations on stubs (stubba) or mock methods on existing classes?
...ort(data_hash). I want to test that this method calls -- among other things -- Product.create with the correct arguments. I was trying to do: def test_import_should_create_product_when_it_does_not_exist Product.stubs( :create ).with( expected_arguments ).times( 1 ) Product.import( import_line ) end I would expect that to either a) raise an exception because it''s invalid or b) fail the test since the implementation of Product.import does not currently call Product.create. Instead, the test passes. Any ideas how I can make this work as expected? -- Regards, John Wilger h...