similar to: Error against latest trunk while testing via spec for model

Displaying 20 results from an estimated 1000 matches similar to: "Error against latest trunk while testing via spec for model"

2007 Jan 30
5
errors while testing resource controller using rpec
I am testing a resource called venue in this piece of code (generated using script/rspec_resource) ==================== context "Requesting /venues using POST" do controller_name :venues setup do @mock_venue = mock(''Venue'') @mock_venue.stub!(:save).and_return(true) @mock_venue.stub!(:to_param).and_return(1) Venue.stub!(:new).and_return(@mock_venue)
2007 Jan 12
2
spec_ui problems
While looking into spec_ui, I decided to run the examples. The watir example works a little, but always chokes on the ''better than fudge'' spec (failure output below). Also, is there any command to pause the "browser"? If my connection slows, the test gets out of whack. The selenium example fails right away (output below). I do have the 0.9.0 selenium-rc
2007 Aug 02
2
Do the :attributes and :content matchers work
[Rails plugin 1.0.5] Hi, I am looking for some guidance. When working on a partial which looks like this <div class="bug" style="width: 100%;" /> I have some examples which should fail - I think - but do not: it '' should fail'' do response.should have_tag( ''div.bug'', :content => ''There is no
2007 Sep 14
6
Need help in View Spec
Hello everyone: I am kind of puzzled in writing spec on view partials. I can not find much information about the "should have_tag" syntax in Rspec. Can rspec test a particular attribute of a tag (e.g. input tag)? Let me put an example here: #../view/group/_index <div id="test"> <input type="button" value="update" onclick="update()"
2007 Mar 09
6
AssertSelect for strings?
Hi, Is there a way to use the have_tag matcher on a string instead of the response body from a view? I have a helper in a method rails project that returns an html fragment which I would like to test. Like this: module SomeHelper def some_helper_method "<p>foo</p>" end end context "The SomeHelper" helper_name :some specify do
2007 Apr 11
13
View Specs Fail with "protected method render"
I''ve got rspec and zentest installed as well as the rspec rails plugin, and my model/controller specs all pass and work well. I can''t seem to get views to work though - 100% of the specs fail with: NoMethodError in ''/users/show.rhtml should render attributes in <p>'' protected method `render'' called for
2007 May 21
9
Ordering in view specs using have_tag and with_tag
When writing view specs is there any way to test not only for the presence of tags (have_tag) and nested tags (with_tag), but also test that they appear in a given order? For example, consider the following: it ''should display the login names, display names and email address in alternating rows'' do response.should have_tag(''div.odd>div'') do
2007 Oct 05
4
have_xml_tag
Hi Was just using have_tag on an xml response and found the problem outlined and resolved here http://weblog.jamisbuck.org/2007/1/4/assert_xml_select Just wondered if there is any support in rspec? Cheers Shane Shane Mingins ELC Technologies (TM) PO Box 247 Santa Barbara, CA 93102 Phone: +64 4 568 6684 Mobile: +64 21 435 586 Email: smingins at elctech.com AIM: ShaneMingins Skype:
2009 Feb 09
3
can't call request.remote_ip from object?
class User def update_metadata self.update_attributes({:last_login_at => Time.now, :last_known_up => request.remote_ip, :last_known_user_agent => request.user_agent}) end This does not work. It bombs out with: undefined local variable or method `request'' for #<User:0x1e146e0> But the request calls work in a
2007 Jul 22
2
have_tag for href with specific link?
Hi folks, I''m trying out this idea of "outside-in" and writing specs for my views first. Being a person who generally starts with some scribbles of a user interface and moves right to models, this has yet to be fun, but I''m giving it a shot. My question: I''m trying to specify that an index page should show a list of things, each with a link to a delete
2009 Apr 16
6
Cucumber - step negating another expecting step
On 16 Apr 2009, at 11:22, Joaquin Rivera Padron wrote: > at the moment I do it this way, hiding the complexity out of the > steps: > > Then /^I should see the people search form$/ do > people_search_form_exists > end > > Then /^I should not see the people search form$/ do > people_search_form_exists "not" > end > > and then the method: > >
2009 May 23
9
undefined method `assert_select'
I''m having trouble getting the specs to run for a plugin where I want to fix a bug. (I''ve actually already found and fixed the bug, but I don''t want to submit a fix without a test!) When I started the specs weren''t running, but it may be that I''m using Rails 2.3.3 and the plugin has been tested on 2.1 and earlier. I went through writing a spec for a
2008 Mar 17
8
should have_tag outside Rails
Hi Google has not helped me here. I''m looking for a way to use the have_tag assert_select wrapper outside RSpec on Rails (but in a Rails project) so I can use it to check text strings. Has anyone managed this? Thanks Ashley -------------- next part -------------- An HTML attachment was scrubbed... URL:
2007 Oct 01
15
how to spec views
I''m trying to spec a view but haven''t done much view specing. This view render different partials depending on authentication of the user: annon, admin, player So I I''ll write if conditionals in the view with the partials it "should render signup propaganda for annon users trying to view games" do render "/games/index.rhtml"
2007 Jun 29
12
testing instance variables that are set inside views
Hi all, In my view specs (for Rails), how can I get at instance variables that are set within my view? For example, if my view looks like this: <% @header = "My Header" -%> <div>some content</div> How can I get to @header from within my view spec? I''ve tried @header and assigns[:header] to no avail. TIA, Jeremy -- Jeremy Stephens Computer Systems
2007 Sep 25
2
Testing for particular CSS (i.e. display: none)
I have a page that hides elements using CSS display: none. I don''t expect RSpec to test any changes made by Javascript; I just want to test how the page loads initially: what is visible and what is not. Can I test this in RSpec? Or do I need to use something like Selenium? -------------- next part -------------- An HTML attachment was scrubbed... URL:
2009 Dec 02
4
http url support in swfdec-0.8.4
Dear All, I am using swfdec-0.8.4 player over directfb.. I am able to play stored swf files where as im not able to play any only swf files I get following error open http://www.foo.com/foobar.swf failure, err = No such file or directory Thanks and regards Deepak -------------- next part -------------- An HTML attachment was scrubbed... URL:
2007 Oct 01
1
have_tag and line numbers
When I''ve got a view example like this: 1: response.should have_tag "fieldset#children" do 2: with_tag "child" 3: end If it can''t find ''child'', the error seems to come back as my_spec.rb:1 instead of my_spec.rb:2. Has anyone else experienced this? I just spent a while tracking down what I assumed was a problem in my have_tag only to
2012 Oct 05
4
PuppetDB Installation
I am attempting to install PuppetDB from source. I am a bit confused however, is lein required? thanks! -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit
2010 Jun 28
1
have_tag matcher in rspec 2?
I always assumed have_tag was part of rspec, but it''s not in rspec 2, and looking now I don''t see it in rspec 1 either. Webrat defines it, but that seems like a coincidence (I tried requiring webrat/core/matchers to no avail). Is it depricated, not yet implemented, or does it work for everyone else? My project is from scratch, rspec-rails 2b13, using generated spec_helper.