search for: get_json_settings

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

2010 Jun 23
1
RSpec, plugins and stubbing controller methods
...ecided to bundle the code (mostly controllers and views) into a plugin to make sharing easier. I copied the RSpec tests for the controllers into the plugin as well. The plugin RSpec tests run, however when it gets to stubbing controller methods it does not work. For example: controller.stub!(:get_json_settings).and_return(Hash["host", "localhost", "port", "1234"]) results in an error ''undefined local variable or method controller''. I know this code was working fine before, since I could run the RSpec tests against the controller prior to it beco...