similar to: Undefined methods: has_selector? and flunk

Displaying 20 results from an estimated 100 matches similar to: "Undefined methods: has_selector? and flunk"

2010 May 07
2
Rspec beta8: helper methods issues
Hello everybody, I am experiencing the following problems, I googled quickly but I couldn''t find any documentation or solution to those issues: 1) the generator rails g rspec:helper does nothing; 2) there seems to be no way to test helper methods as I used to do... for example the following spec it ''should set monday as first day of the week'' do
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
2013 Mar 02
0
Problems getting rspec testing working in OSX?
Hey Gang, Running into a weird error when trying to follow puppetlabs'' blog: https://puppetlabs.com/blog/the-next-generation-of-puppet-module-testing/ I''m running 10.8.2, using default ruby, in an attempt to make my home env a little more sane, (ran into weird rbenv issues at work, which I won''t go into here) The google tells me not a whole lot. Appreciate any help
2010 Aug 11
6
rspec2 not working with shoulda
I am using rails edge. I am using gem "rspec-rails", "= 2.0.0.beta. 19" . I have following code at spec/models/user_spec.rb require ''spec_helper'' describe User do it { should validate_presence_of(:email) } it { should validate_presence_of(:name) } end Here is my gemfile group :development, :test do gem ''factory_girl_rails'',
2009 Jan 13
2
Using has_selector to identify responses.
This is more of a "best practices" question. Earlier, when I was trying to understand what it was I was supposed to be testing with cucumber, I was advised that I should test for text elements contained in the response body of the expected output. Now, what I am wondering is how one accounts for multilingual implementation. I have hit upon the idea of simply adding special css id
2011 Mar 09
1
undefined method `flunk' for #<Spec::Example::ExampleGroup::Subclass_1:0x0000000516bd40>
I''m running into an issue using ONLY rspec version 1.3.3 (no rails / rspec-rails with this project) where i''m hitting the following error: My code looks like this: describe Win32Meterpreter before :all helper_method end def helper_method ## If a session came back, try to interact with it. if @session
2008 Jan 24
3
Help to spec a rails helper method that uses content_for
Hi guys, I am a Rspec newbie and am having problems creating a spec for a RoR helper method. I have in fact already implemented the helper method and am trying to create retrospective specs. I know its the wrong way to do it but I am still learning Rspec. In my view I have a call to a helper method. <% body_class "users" %> which sets a CSS class declaration in the content_for
2010 Jun 20
10
RSpec 2 view example: render_template
On http://github.com/rspec/rspec-rails under "View specs" there''s an example describe "events/index.html.erb" do it "renders _event partial for each event" do assign(:events, [stub_model(Event), stub_model(Event)]) render view.should render_template(:partial => "_event", :count => 2) end end Is this indeed correct? From the
2012 Sep 15
2
[RSpec Testing] Methods take two arguments
Hello, Here is my *pdf_helper.rb* => http://pastebin.com/QU1kTKXk. I want to test, if self.create method can take more than two arguments. But, when I try to run my test. It showed *PdfHelper Should have two arguments Failure/Error: create_pdf.should_receive(object,template).with(user,file) NameError: undefined local variable or method `create_pdf'' for
2012 Jul 17
24
Static Pages from Railcast
Hi everyone, I need several pages to be static but also modify when requested. I try following the railcast from Ryan at http://railscasts.com/episodes/117-semi-static-pages?view=comments Here what I have done!! rails g scaffold Pages name:string permanentlink:string title:string author:string access_level:string is_published:boolean meta_description:string meta_keyword:string
2010 Jun 20
7
rspec-rails 2.0.0.beta.12 showing undefined method error for route_to
First of all, I''ve been trying to find an answer for this problem all over the internet without luck. The thing is that I am using RVM with ruby 1.9.2-head and I created a new empty gemset. Then I installed bundler gem with: gem bundler install That installed the library into the /Users/damselem/.rvm/gems/ ruby-1.9.2-head at rails3/gems directory. Then I went to my rails 3 app
2008 Sep 26
6
BDD / cucumber thought - chaining ''Then'' steps with Which
Going back to the debate about keeping state between steps, I found myself with the mild urge to be able to write this today: Given there is a user And the user has 20 friends Then I should see a thumbnail of each of the users''s friends Which should be a link to the user profile page for that friend NB: An idiom in this which may be songkick-only but was inspired by what
2007 Jul 26
5
Test errors without verification
I''m not sure if this is by design, but I''ve stumbled across this a few times trying to debug my own tests. If an assertion fails the test, and a mock expectation was to blame, the test''s failure / error messages don''t give enough info. I''ve had to resort to def teardown mocha_verify end which just gets tedious. I''ve created a patch
2010 Aug 30
1
undefined method `route_for' for #<RSpec::Core::ExampleGroup::Nested_1::Nested_1:
Hello, all, I have this error with my rspec - controller - test, and yes, I do found the thread with the same error here, but it isn''t helped me, think it''s not my case. i have rails -v = Rails 3.0.0.rc, rspec -v = 2.0.0.beta.18 (hope they should match each other). my test is here: spec/controllers/posts_controller_spec.rb and i ran it with command: rspec
2009 Jun 30
0
[PATCH server] permit many-to-many vms / networks relationship
- db, model, service, controller, and view changes - many tests additions - various fixes / cleanup to get things working depends on my last two (still unacked) patches: - add collapsable sections to vm form - provide default vm allocated cpu and memory values ovirt-agent might need to be updated to work with the changes --- src/app/controllers/pool_controller.rb | 2 +-
2012 Sep 16
0
tutorail test writing problem
Hello, I try to follow this tutorial : http://ruby.railstutorial.org/ruby-on-rails-tutorial-book Im now at chapter 3.2.1. But the test is still failing even if I do everything according to the chapter. My code can be found here : https://github.com/roelof1967/demo_app And the faiing message is : Failures: 1) Static pages Home page should have the content ''Sample App''
2008 Dec 03
5
How to test a plugin
Guys, I''ve created a plugin, i wanna put my automated test there. However, I got bad file descriptor error when i run the test like normal unit test file: "ruby plugins/acts_as_fox/test/acts_as_fox_test.rb" How to test a plugin? Also, is it right to say that I should only put my unit tests (but not functional test for example) for the plugin in the plugin test folder?
2007 Jul 14
8
Specing Layouts
Hi, I''ve just started to try and spec my application.html.erb layout as one of the view specs but it totally barfs. I''m guessing that it''s due to the yield statements in the layout. Any clues as to how to proceed? Cheers Daniel -------------- next part -------------- An HTML attachment was scrubbed... URL:
2009 Nov 03
0
[PATCH server] suggest ip address for nics/bondings on edit host/vm network forms
Provides a mechanism to generate ip addresses for static networks and prefill the 'ip address' fields of the host and vm networking forms w/ the first suggested ip. --- src/app/controllers/vm_controller.rb | 2 +- src/app/models/ip_address.rb | 52 +++++++++++++++++++++++++++++++++ src/app/models/network.rb | 11 +++++++ src/app/models/physical_network.rb |
2006 Nov 29
0
[762] trunk/wxruby2/tests/test_intl.rb: Make it clearer that this is a TODO - test failure is expected
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!-- #msg dl { border: 1px #006 solid; background: #369; padding: