similar to: assigns in trunk

Displaying 20 results from an estimated 1000 matches similar to: "assigns in trunk"

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 May 22
5
rails edge
hi, first time trying rspec, and rails edge. Are there any known issues running rspec with rails edge? for one, apparently script/generate scaffold_resource has been renamed just "resource". Do I just search/replace "scaffold_resource" with "resource" in file rspec_resource_generator.rb ? Somethings still missing. before i get "Couldn''t find
2007 Apr 05
3
Extending assigns in controller specs?
Hello, I am interested in enhancing assigns in controller specs to do things like the following assigns[:key1, :key2, :key3] #=> vals for keys Is there away to "break open" this construction to overload the :[] operator? Thanks. -Chris
2007 Apr 13
0
ANN 0.9-beta-2
I''ve just made a new beta release available that fixes some more bugs to the translator. http://www.nabble.com/ANN:-RSpec-0.9.0-beta-1-available-for-download.-t3526973.html Additional changes since 0.9 beta-1: * Made Spec::Ui *much* easier to install. It will be released separately. Check out trunk/spec_ui/examples * HTML reports now include a syntax highlighted snippet of the source
2007 Oct 05
0
RSpec Trunk - Successful : Rake Aborted
$ rake spec --trace (in /work/workspace/ng) ** Invoke spec (first_time) ** Invoke db:test:prepare (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:test:prepare ** Invoke db:test:clone (first_time) ** Invoke db:schema:dump (first_time) ** Invoke environment ** Execute db:schema:dump ** Invoke db:test:purge (first_time) ** Invoke environment ** Execute
2010 Jun 10
1
RSpec 2 equivalent for: assigns[:message].should == @message
describe MessagesController, "POST create" do before(:each) do @message = mock_model(Message, :save => nil) Message.stub(:new).and_return(@message) end context "when the message fails to save" do before(:each) do @message.stub(:save).and_return(false) end it "assigns @message" do post :create assigns[:message].should
2006 Jan 20
2
Help needed using assigns() functionality in functional test
Accidentally posted this to the engines group first...dang computers :-) I''m trying to create a functional test where the controller action (for now, anyway) breaks apart a string and populates intermediate variables with the results. I want to check the intermediate vars in my test, so I tried the following (in the controller) def string_action # do some processing, etc.
2006 Mar 01
1
assigns() method disappeared from test_process.rb
I just noticed that the assigns() method has been dropped from action_controller/test_process.rb (http://dev.rubyonrails.org/changeset/3724). Was this an oversight or is there a new process for working with controller instance variables? -- * J * ~
2011 Jul 06
0
undefined method `assigns' and undefined method `post'
Hi, I have an error of undefined method. can anyone help me to solve it. I follow the tutorial to practicing testing controller of rails, and now i got stuck with the error.. plz help error: undefined method `post'' for #<Spec::Example::ExampleGroup::Subclass_1:0xb7754114> undefined method `assigns'' for #<Spec::Example::ExampleGroup::Subclass_1:0xb785d1b4> Test file
2007 Sep 12
8
Can not ''assigns'' value in View test
Hello everyone: I am quit new to View test using rspec. I want to write spec for a partial, which is rendered by a controller. However, the controller does not pass data to the partial using instance variables, it uses symbol variable instead. I read the example of view spec provided in the website. But the example is using instance variable. So I am looking for a way of assigning my test data
2013 May 05
1
Bug#706876: xen-utils-common: network-bridge assigns addresses, breaking ifup
Package: xen-utils-common Version: 4.1.4-3 Severity: important Dear Maintainer, Executive summary: dist-upgrade - squeeze to wheezy. Rebooted machine; no default route on network interface eth0. Commented 'transfer_addrs' function in network-bridge produced a machine which worked after reboot. We're using network-bridge as our xen networking configuration. After rebooting the
2006 Nov 14
0
rspec "assigns" and "render"
Hi all, I''m trying to create some view specs using rspec following the example at http://rspec.rubyforge.org/documentation/rails/writing/views.html However, when I put @person = mock("person") @person.stub!(:name).and_return ''Joe'' assign[:person] = @person I get a NameError saying that ''assigns'' is not defined. Similarly, "render
2007 Dec 13
8
stub with assigns?
is there a way to stub a method that sets an instance variable, so the stub sets it too? def find_foo @foo = Foo.find(params[:id] end ... controller.stub!(:find_foo).and_assigns(:foo, "123") -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20071213/2042719f/attachment.html
2006 Dec 13
3
Testing has_many :through
I''m working with a has_many :through association, where a Member has_many Projects through ProjectViewers. The problem I''m running into is that Rails doesn''t load the association so line (3) fails until I explicitly access a member of the collection (in this case, I iterated it). Is there a better way? Thanks, Steve 1. assigns[:member].should_not_be_nil 2.
2007 Nov 10
2
Problem with view spec - works inside the browser but spec fails with nil object
Hi, I''ve been trying to find an answer for this problem in the last couple hours, but I think no discussion was about this exact same thing. So here it goes, hope someone can help. I''m trying to spec a view which works correctly on the browser, but that generates the following error when I run "rake spec:views". ActionView::TemplateError in ''/survey/show
2005 Apr 19
3
Rails 0.12.1: No major update without a bit of pain
There''s nothing like pushing a new major update in order to find bugs in the code when its exposed to a couple of hundred working applications. Thankfully the fixes were almost as swift as the reports. In any case, you''ll _definitely_ want to upgrade to 0.12.1 right away. There''s a good handful of fixes for both Action Pack and Active Record (mostly concerning the
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)
2006 Dec 31
2
what''s with the response.should_be_xxxx stacktrace?
If I do get :index response.should_be_success I get about 20k of marshalled dumpage that starts like #<ActionController::TestResponse:0x390443c @body=\"<html><body>You are being <a href=\"http://test.host/carts/1\">redirected</a>.</body></html>\", @assigns=[], @redirected_to={:action=>\"show\", :id=>1},
2007 Feb 01
3
should_redirect_to in rspec-0.8.0 / rspec_on_rails 1453
I have a spec: specify "a post with no user id should add a record" do post :edit_or_create, :user => {:login => ''joeschmoe'', :email => ''joe at shmoe.com'', :email_confirmation => ''joe at shmoe.com'', :full_name => ''Joe Schmoe''} assigns[:user].should_not_be_nil
2015 Oct 08
3
OpenSSH and stdin/stdout assigning
Hey, guys, I have a question about a difference between openssh 4.3 and 5.3. I have plenty of servers with RHEL5 and RHEL6. Most of RHEL5 servers have openssh-server version 4.3p2-72.el5_6.3 (kernel 2.6.39-100.7.1uek) And RHEL6 servers have 5.3p1-111.el6 (kernel 3.8.13-35.el6uek.x86_64) So there is the difference in assigning stdin and stdout for ssh connections. Openssh 4.3 assigns socket (I