Displaying 13 results from an estimated 13 matches for "expectationnotmeterror".
2007 Oct 16
6
RailsStory runner - empty response
...page
So that I can get a birds eye view of the system
Scenario: Publisher with no videos
When visiting /
Then viewer should see companies/show_initial
F
1 scenarios: 0 succeeded, 1 failed, 0 pending
FAILURES:
1) View Home Page (Publisher with no videos) FAILED
Spec::Expectations::ExpectationNotMetError: expected /Welcome/, got ""
/Users/alvin/workspace/rspec-stories/config/../vendor/plugins/rspec/lib/spec/expectations.rb:52:in
`fail_with''
/Users/alvin/workspace/rspec-stories/config/../vendor/plugins/rspec/lib/spec/expectations/handler.rb:21:in
`handle_matcher''
/Us...
2007 Sep 05
6
Caveman Questions
Hello!
I''m just a caveman with some caveman questions.
I''ve been parsing Rspec for quite a while, and I''m writing my first series
of specs. My initial impressions are "Verbose, but understandable. Helpful
and intuitive, but so much to digest." I want to congratulate the folks who
are dedicating a chunk of their lives to writing this, and ask 2 caveman
2007 Feb 15
1
Specs for RJS HTML output NOT containing an element
...sert
select.
What I''ve just cobbled together is this addition to my spec_helper.rb:
module Spec
module Rails
class AssertSelectWrapper
def should_not_have(*opts)
begin
should_have(*opts)
rescue Spec::Expectations::ExpectationNotMetError
else
fail_with("Expected no matching elements but at least
one was detected.")
end
end
end
end
end
module ActionController
class TestResponse
def should_not_have(*opts)
__assert_sel...
2006 Nov 08
1
controller.session not same as session?
...ion[:user].should_be_nil
> end
> end
>
> The result:
>
> A user logging out
> - should unset :user in controller.session
> - should unset :user in session (FAILED - 1)
> - should be redirected
> - should delete remember_me token
>
> 1)
> Spec::Expectations::ExpectationNotMetError in ''A user logging out
> should unset :user in session''
> 1 should be nil
> ./spec/controllers/account_controller_spec.rb:149:in `should
> unset :user in session''
>
> Throwing a breakpoint in and examining the two reveals:
>
> >> session
>...
2008 Oct 18
4
Problems when programmatically defining examples
Hi,
I am trying to code an application that is based on Rspec; I am
programmatically building examples, and launching the runner with a custom
formatter. Here are the code snippets from my app:
Launching the runner:
example_groups =
test_expectation.example_groups_for(system_state)
@output = StringIO.new
options =
2012 Jun 14
3
response.should have_content("1 movie") does not seem to work for me
...1
When I create a movie Caddyshack in the Comedy genre #
features/step_definitions/movie_steps.rb:1
Then Caddyshack should be in the Comedy genre #
features/step_definitions/movie_steps.rb:10
expected there to be content "1 movie" in ""
(RSpec::Expectations::ExpectationNotMetError)
./features/step_definitions/movie_steps.rb:14:in `/^Caddyshack
should be in the Comedy genre$/''
features/create_movie.feature:10:in `Then Caddyshack should be in
the Comedy genre''
I''m sort of confused anyway, because in the RSpec book I''m told to us...
2011 Sep 13
12
Assertions for asynchronous behaviour
Hi all,
In GOOS[1] they use an assertion called assertEventually which samples the system for a success state until a certain timeout has elapsed. This allows you to synchronise the tests with asynchronous code.
Do we have an equivalent of that in the Ruby / RSpec world already? I know capybara has wait_until { } but that''s fairly rudimentary - the failure message isn''t very
2006 Oct 07
0
should_have_tag: What am I doing wrong?
My spec contains:
response.should_have_tag "<legend>", :content => "Add new Contact"
The output is:
Spec::Expectations::ExpectationNotMetError in ''The ResourceController
should do something when I try to edit contacts''
..
<legend>Add new Contact</legend>
..
should include [[{:content=>"Add new Contact", :tag=>"<legend>"}]]
This looks right to me...
Jay Levitt
2006 Oct 17
0
actual.should != not_expected
...ot;should[_be] <arbitrary operator>:" do
specify "should pass when != operator returns true" do
(2+2).should != 3
end
end
and the result.
$ bin/spec spec/spec/expectations/helper/ \
-s "should pass when != operator returns true"
F
1)
Spec::Expectations::ExpectationNotMetError in ''should[_be] <arbitrary
operator>: should pass when != operator returns true''
4 should == 3
./spec/spec/expectations/helper//should_be_arbitrary_operator_spec.rb:14:in
`should pass when != operator returns true''
Finished in 0.000647 seconds
1 specification, 1 f...
2010 Oct 14
1
Cucumber Selenium web step to verify value of input field
I have an input field with an id which has a value. The web_steps.rb method
does not find the value. Is this the right step to use to check an input
field? It works fine for a text_area but not an input.
Scenario steps (tried both ways):
Then the "travel_card_number_gate" field should contain "5"
Then the "#travel_card_number_gate" field should contain "5"
2010 Jul 08
3
Testing equality
Hello
How can I test equality with two objects when they include some
attribute that is BigDecimal?
if I make something like this:
it "should ...whatever" do
obj = Factory.create(:my_object)
...
MyObject.first.should == obj
end.
FAILS
This fails because the object expected is different from the object
gotten, and the only difference are the BigDecimal attributes, that are
2006 Oct 24
2
1 should be 2. huh?
There''s another quirk I wanted to bring up. It''s about the failure
message with should_equal and should_be.
x.should_equal 2
a.should_not_be nil
When they fail they yield messages like:
1 should equal 2
nil should not be nil
When I''m caught off guard, which can be often, these messages confuse
me. 1 should equal 2? No it shouldn''t. nil should not be
2006 Jun 16
0
rake spec controller test output hideus.
...ruby/gems/1.8/gems/rspec-0.5.9/lib/spec/rake/../../../bin/spec"
"spec/controllers/forum_controller_spec.rb"
"spec/controllers/home_controller_spec.rb"
"spec/controllers/links_controller_spec.rb"
"spec/controllers/user_controller_spec.rb"
.......F.
1)
ExpectationNotMetError in ''The UserController should not allow new
users without the correct fields''
ActionController::TestResponse
#<ActionController::TestResponse:0x24d6880 @body="<!DOCTYPE html
PUBLIC \"-//W3C//DTD XHTML
1.1//EN\"\n\t\"http://www.w3.org/TR/xhtml11/DTD/xhtml1...