similar to: have_selector syntax?

Displaying 20 results from an estimated 30000 matches similar to: "have_selector syntax?"

2011 Oct 08
1
Rails view spec expectations/matchers
>From looking at the RSpec Rails documentation (https://www.relishapp.com/rspec/rspec-rails/docs/view-specs/view-spec) it seems like rendered is just a string and you can''t really do any assert_select type stuff out of the box. After Googling around, it seems that the RSpec authors decided that if you want that functionality, you should just use Capybara or some such... is that
2013 Jan 09
2
Rails 3.2.10 and Rspec Tests that Fail?
The following tests used to reside in requests directory and used to work ... since I have upgraded to rails 3.2.9 and now 3.2.10 they fail. I have the following tests in(I am only showing the first two tests): spec/features/authentication_pages_spec.rb require ''spec_helper'' describe "Authentication" do subject { page }
2011 Apr 26
1
new goodness, Capybara::RSpecMatchers in helper specs
This https://github.com/rspec/rspec-rails/commit/59793dcc349b64f4ebcf742606371001256c774d is exciting news!! ("this adds capybara matchers to view and helper specs") Now, if I just knew how to take advantage of it? Do I have to require something else in spec_helper? I have already added included gem ''rspec-rails'', ''~> 2.6.0.rc2'' gem
2012 Jul 22
1
RSpec/rails & Capybara: #within
I''m new with Capybara and after a good amount of google, I still can''t figure out how the #within methods works! I can use it only if I call visit before? There''s no way to use it on a string, like the `page = Capybara.string(html_string)` trick? When describe a view, I want something like that: describe "path/to/view.html.erb" do it "should pass"
2010 Sep 01
2
Undefined methods: has_selector? and flunk
I''m in the process of updating an app for Rails 3.0 and rspec-rails 2.0.0.beta20. When I''m running my specs (rake spec) I get a large number of errors caused by two undefined methods undefined method `has_selector?'' for #<String:0x7fdbd0b5b270> undefined method `flunk'' for
2013 May 12
10
Capybara with redirect
I am having an issue where a feature works fine but the corresponding test fails, and I can''t understand why. I created a mock application to demonstrate the problem. https://github.com/assafshomer/clear_button All it does is show an input form with a clear button. The clearing happens by redirecting back to the same form. It does clear it when you run the app, but the test for it
2011 Jul 25
6
What does using a lambda in rspec tests accomplish?
Here is the code in question: describe UsersController do render_views … … describe "POST to ''create'' action" do describe "failure" do before(:each) do @attr = { :name => '''', :email => '''', :password => '''', :password_confirmation =>
2010 Oct 20
3
rspec error's when checking LayoutLinks from the railstutorials
I am following the rails tutorial: http://railstutorial.org/chapters/filling-in-the-layout#top Basically the test is something like: spec/requests/layout_links_spec.rb require ''spec_helper'' describe "LayoutLinks" do it "should have a Home page at ''/''" do get ''/'' response.should
2011 Jul 25
7
Adding a folder to my rspec execution path
Hi guys, I''m using RSpec with Capybara, and for that I created the spec/integration folder. But when I execute the command "bundle exec rspec spec" RSpec don''t execute my files on integration folder. I need to pass each file to solve this problem. Do you known how I can put the integration folder on rspec execution path without need to pass each file? Thanks, Pablo
2009 Apr 02
8
Problem with Custom matcher and Blocks
Hi, I''m trying to write my first custom matcher. Here''s a bit of my example group. describe "/contact/index" do include FormMatchers before(:each) do render ''contact/index'' end it "should show the contact form" do response.should have_a_contact_form end describe "the contact form" do context
2013 Oct 08
1
Trouble with rspec and FactoryGirl Sequence
I''m following Michael Hartl''s Ruby on Rails 3 Tutorial but I''m using Rails 3.2.8 and FactoryGirl 4.2.0 and rspec 2.14.1 I''m in chapter 10 trying to generate tests for pagination (using will_paginate 3.2.5 which works fine in dev) I can get FactoryGirl to test just fine if I don''t use Sequence but I can''t seem to figure out the correct syntax
2013 Jun 18
1
Getting rspec error: Net::SMTPServerBusy: Relay access denied
I''m trying to test registration emails (sent with devise), and I keep getting the error: Net::SMTPServerBusy: 454 4.7.1 <model_spec-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org>: Relay access denied I''m running Rails 3.2.11 with Capybara, and I have (temporarily) chopped my spec_helper.rb and test.rb files down to the bare minimum, still getting the error above.
2012 Jan 17
2
does jruby rspec have to use selenium?
With jruby and rspec requests, do you have to use selenium webdriver? I''m confused, with ruby and rubyonrails using cucumber with capybara, I didn''t have to set the default driver, what was it using and can i use that with jruby? Things just worked w/o me even having to know about it :) -------------- next part -------------- An HTML attachment was scrubbed... URL:
2012 Jun 14
3
response.should have_content("1 movie") does not seem to work for me
Hey everybody I have worked quite to near the end of The RSpec Book, but now I''m having some troubles. I''m trying to get the last few Cucumber steps to work, which are: Then /^Caddyshack should be in the Comedy genre$/ do visit genres_path click_link "Comedy" save_and_open_page response.should have_content("1 movie") response.should
2012 Mar 07
6
Can't find the PostgreSQL client library (libpq)
When i try it start my ruby server i get a error that looks like rails server Could not find pg-0.12.2 in any of the sources Run `bundle install` to install missing gems. I dont know what to do Thanks for all the help -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this
2012 Jun 14
1
Cucumber/RSpec ::: Capybara? Webrat What am I using??
Hey everybody I''m currently reading through the Pragmatic Programmers RSpec book, and I really enjoy it. But I’m facing some problems because of the fact that the book is already some years old, I guess. I have installed rvm and use Ruby 1.9.3, and I didn’t really get some Rails code examples to work properly, so I tried it with a 1.8.7 installation, but there I had some other problems
2011 Aug 28
1
troubles running rspec..
developing a 3.1 app. trying to run spec on and get this error: bundle exec rake spec ***************************************************************** DEPRECATION WARNING: you are using a deprecated constant that will be removed from a future version of RSpec. /home/slava/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/ runtime.rb:68:in `require'' * Rspec is deprecated. *
2012 Nov 06
2
rspec failure upon revisit
I just returned from a different project after taking a few weeks off of my tutorial. I''m using Ruby on Rails 3 Tutorial - Learn Rails by Example by Michael Hartl. After rebooting my server I ran an rspec spec/ command to check to see if there were any problems and this is what I received. I didn''t modify anything except I did overwrite users_controller.rb and
2010 Dec 16
12
Capybara + radio buttons
How do I select a radio button when both id and name are identical?: <input type="radio" name="BILFPB.bilPremieUppgifterFI.under24" tabindex="13" value="J24" checked="checked" id="forare">Ja <input type="radio" name="BILFPB.bilPremieUppgifterFI.under24" tabindex="14" value="N24"
2011 Oct 18
8
rspec 1.3.2, Rails 2.3.14 - plugins not loading
Hi there I have a weird situation. I have inherited a project in Rails 1.2.3 that has been upgraded to Rails 2.3.14 (and is running). I have installed Cucumber and Rspec to start to write features/tests for the new code that needs to be written. In my Gemfile, these Gems are loaded: group :test do gem ''rspec-rails'', ''~> 1.3.4'', :require =>