search for: controller_spec

Displaying 11 results from an estimated 11 matches for "controller_spec".

2007 Sep 27
2
1.0.8 tarball problem.
...ignored rspec-1.0.8/spec/spec/translator_spec.rb rspec-1.0.8/spec/spec_helper.rb rspec-1.0.8/UPGRADE tar: Child returned status 2 tar: Error exit delayed from previous errors And for rspec_on_rails: <snip> rspec_on_rails-1.0.8/spec_resources/views/ rspec_on_rails-1.0.8/spec_resources/views/controller_spec/ gzip: stdin: decompression OK, trailing garbage ignored rspec_on_rails-1.0.8/spec_resources/views/controller_spec/_partial.rhtml rspec_on_rails-1.0.8/spec_resources/views/controller_spec/action_setting_flash_after_session_reset.rhtml <snip> rspec_on_rails-1.0.8/tasks/ rspec_on_rails-1.0.8...
2006 Nov 03
10
[PLUGIN] rspec_resource_generator - RESTful scaffold generator with RSpec specifications
rspec_resource_generator ======================== By Pat Maddox Use this generator to generate RESTful scaffolding with RSpec specifications. Syntax is exactly the same as the scaffold_resource generator: ./script/generate rspec_resource ModelName [field:type field:type] When you run this generator, it will create a migration, model, and model spec file. In addition, it gives you a RESTful
2007 Feb 15
4
defining context(s) dynamically
...<html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> Q. Why does code which defines a context work in the <tt>controller_spec</tt> file and not in a ''require''d helper file?<br> <br> A. Because spec uses the filename to tell it what type of context (:controller, :model) it is creating.<br> <br> Fix: use the (undocumented?) second parameter to <tt>#context(), </tt>...
2007 Aug 07
1
Rspec controller test
...ethods do require parameters. I am wondering how I can pass the test cases as the parameters to these targeted methods in the controller spec?? Below is a simple example for illustration: in the controller: def method_for_test(parameter_1, parameter_2) #do some coding #no action end in the controller_spec: it "should test the method_for_test" do parameter_1 parameter_2 ??how to pass them to method_for_test end Thank you all in advance. -- View this message in context: http://www.nabble.com/Rspec-controller-test-tf4229016.html#a12030820 Sent from the rspec-users mailing list a...
2006 Nov 22
1
rspec_on_rails (MissingSourceFile)
...This file seems to be missing: ${RAILS_DEV_DIR}/spec/models/../../vendor/generators/rspec/lib/rspec_on_rails (MissingSourceFile) Here''s my vendor/generators dir : vendor/generators |-- rspec_controller | |-- USAGE | |-- rspec_controller_generator.rb | `-- templates | `-- controller_spec.rb `-- rspec_model |-- USAGE |-- rspec_model_generator.rb `-- templates `-- model_spec.rb No rspec/lib/rspec_on_rails in there??? There is a vendor/plugins/rspec/lib/rspec_on_rails.rb file however. I''m stumped. Any ideas ? Keith
2007 Oct 12
3
Strange mock_model behaviour with ActiveResource model
...me/jhughes/dev/rj/gump_rewrite/vendor/plugins/rspec_on_rails/lib/spec/rails/dsl/behaviour/rails_example.rb:85:in `add_stubs'' /home/jhughes/dev/rj/gump_rewrite/vendor/plugins/rspec_on_rails/lib/spec/rails/dsl/behaviour/rails_example.rb:73:in `mock_model'' ./spec/controllers/fa_codes_controller_spec.rb:64: This is with edge rails, trunk rspec and rspec_on_rails. I might have pegged this as some Ares wierdness, but there are two models with the same setup, and only one dies like this. Any ideas? James
2012 Nov 12
7
RSpec: controller POST create
Rails 3.1.3 rspec-rails (2.11.4) rspec 2.11.1 I am new to rspec. I don''t quite understand tests for POST create part. I have generated scaffold, and simultaneously it generated controller_spec.rb as well. it "assigns a newly created plan as @plan" do post :create, {:plan => valid_attributes}, valid_session assigns(:plan).should be_a(Plan) assigns(:plan).should be_persisted end is the default POST create test. It raises a failure, if I c...
2009 Feb 20
6
How to mock an object defined in the before_filter function?
Hello, I am trying to implement the following scenario, but I am stuck ... The thing is I want to initialize a variable @comment when the stub function "find_comment" is called. The way I do it below doesn''t work, since "before_filter :find_comment" returns true/false and @comment initialization is done inside it. Could you please give me a hint how to do it? One
2006 Nov 22
0
rspec_on_rails MissingSourceFile
...This file seems to be missing: ${RAILS_DEV_DIR}/spec/models/../../vendor/generators/rspec/lib/rspec_on_rails (MissingSourceFile) Here''s my vendor/generators dir : vendor/generators |-- rspec_controller | |-- USAGE | |-- rspec_controller_generator.rb | `-- templates | `-- controller_spec.rb `-- rspec_model |-- USAGE |-- rspec_model_generator.rb `-- templates `-- model_spec.rb No rspec/lib/rspec_on_rails in there??? There is a vendor/plugins/rspec/lib/rspec_on_rails.rb file however. I''m stumped. Any ideas ? Keith
2007 Jul 26
5
Coding standards and whitespace
...ails_app/lib/tasks/bootstrap_rspec.rake example_rails_app/public/.htaccess example_rails_app/public/index.html example_rails_app/public/javascripts/controls.js example_rails_app/public/javascripts/dragdrop.js example_rails_app/public/javascripts/effects.js example_rails_app/spec/controllers/naughty_controller_spec.rb example_rails_app/spec/controllers/people_controller_spec.rb example_rails_app/spec/fixtures/animals.yml example_rails_app/spec/helpers/people_helper_spec.rb example_rails_app/spec/models/person_spec.rb example_rails_app/spec/views/person/create_view_spec.rb example_rails_app/spec/views/person/s...
2007 Apr 11
12
redirection doesn''t get detected well?
I''m doing a redirect in one of my controller actions and somehow I can''t spec it, see this pastie: http://pastie.caboo.se/53120. When following the link from a browser I''m being redirected to the right page. -------------- next part -------------- An HTML attachment was scrubbed... URL: