similar to: support for arbitrary comparisons

Displaying 20 results from an estimated 2000 matches similar to: "support for arbitrary comparisons"

2006 Oct 16
2
subject.should_be true
As things stand now, the following will all pass: true.should_be true "true".should_be true "false".should_be true 3.should_be true etc My feeling is that "should_be true" should only pass if it returns boolean true even though ruby says that non-nil/non-false is true. Anybody else? David
2006 Nov 19
6
artificial sugar causes cancer
All, If you look at http://rubyforge.org/tracker/index.php?func=detail&aid=6760&group_id=797&atid=3149 you''ll see that Chad (the submitter) found the source of the bug. Unfortunately, the source of *this* bug is the *solution* to a *previous bug* in which Rails was replacing RSpec''s method missing with its own. When we settled on underscores, my one reservation was
2006 Nov 19
2
underscores, sugar, and more and more bugs
I sent this earlier under with the subject "artificial sugar causes cancer" and I think some spam filters ate it. Here it is again: ====================================== All, If you look at http://rubyforge.org/tracker/index.php?func=detail&aid=6760&group_id=797&atid=3149 you''ll see that Chad (the submitter) found the source of the bug. Unfortunately, the source
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 Oct 17
0
new handling of equality
All, Based mostly on the earlier thread on "should_be", we have introduced a new branch called should_be_working_like_ruby with the new proposed handling for equality. Per the CHANGES file in that branch (rev 896): ============================================ IMPORTANT NOTE: THIS RELEASE IS NOT 100% BACKWARDS COMPATIBLE TO 0.6.x This release changes the way RSpec handles equality.
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
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.
2008 Aug 20
9
I want RSpec for CSS layout.
I don''t even know how it''d be possible (through Selenium?), but I want it. I want to see if my stupid CSS hacks break. I want to say: describe "#nav-column" do body = something("#body-column") it "should line up at the top" do dom[:top].should_be == body.dom[:top] end it "should always be to the right" do
2007 Apr 09
10
changes in 0.8 and greater - should_
Has the should_... syntax changed? I''m getting errors when running the following: should_render(:index) should_be_valid should_not_be_valid should_respond_to should_be should_render I thought the syntax changed to something like the following: obj.should render(:index) but this doesn''t seem to work. Scott
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 04
10
Spec''ing ActionMailer
Good morning (Pacific Time). I have a controller action that, as a side-effect, sends an email to an administrator. I want it to do something like this: specify "when someone successfully signs up, an email should be sent to the administrator with the person''s contact page" do post :signup, {...lots o'' params} response should_be success #
2007 May 09
4
UI testing framework? (w/o selenium)
Hey all, I am currently working on coming up w/ an easy to use, developer-centric web testing framework to test a J2EE app with. (I have 3 rails apps in production, love rspec, and am currently at a java shop). I''ve looked at selenium, and it just doesn''t seem like it is ready for prime time, and the target audience is developers. So, having said that, does the rspec
2007 Mar 14
5
What''s the new syntax for predicates?
@settings.should allow_publish_ip("127.0.0.1") fails with undefined method `allow_publish_ip'' for #<#<Class:0x2f8fd48>:0x2f5a968> @settings.should_allow_publish_ip("127.0.0.1") works fine This is rspec 0.8.2. http://rspec.rubyforge.org/documentation/expectations.html says that matching arbitrary predicates is deprecated and to see
2007 Apr 11
10
DRYer controller specs
So, I''ve been following the recommendations for controller specs here: http://blog.davidchelimsky.net/articles/2006/11/09/tutorial-rspec-stubs-and-mocks Most notably: a single expectation per specify block; the setup block contains only stubs; mock expectations each get their own specify block. (I''m still using 0.8, so I haven''t gotten the describe/it goodness yet.) I
2006 Oct 17
0
actual.should != not_expected
All, In dealing with the changes to should in the should_be_working_like_ruby branch, I am reminded that while we got the following to work ... actual.should_be < value actual.should_be <= value actual.should == value actual.should =~ value actual.should_be >= value actual.should_be > value ... we were not able to get this to work: actual.should != value Here''s what the
2006 Sep 07
0
Dead easy Watir AND Selenium
Yesterday I added some Watir examples to RSpec''s svn. Today I added some Selenium (actually - Selenium Remote Control) examples. It''s dead easy to use both, and the Ruby code you end up writing is actually quite similar. Here''s a taste: == Watir == require File.dirname(__FILE__) + ''/rspec_watir'' context "Google''s search page" do
2007 Apr 08
2
typos in a tutorial page
This page has some typos in the forth grey box http://rspec.rubyforge.org/tutorials/stack_04.html "should_equal" should be "should ==" and "should_not_be_empty" should be "should_not be_empty" this causes some spec to fail By the way, this is my first mail to the list, so Hi everybody !!
2007 Feb 28
12
Specifying that code is called in a block
Not sure if this is possible currently. I have a section of code like this: ActiveRecord::Base.transaction do cow.save! duck.save! dog.save! end (Names changed to protect the innocent.) I''d like to specify that the saves run in a transaction. I can do ActiveRecord::Base.should_receive(:transaction).and_yield But is there any way to specify that the code is
2006 Jan 06
1
Folder with a questionmark "?mnt1"
Hey guys, i had a folder ~/mnt1 where a smbmount was mounted in. I browsed the subnet with smbc as normal user, than my ssh connection crashed because of disconnecting my remote wlan. :-/ Now i cannot access to mnt1, even root can't. The folder listing needs a lot of time and does not list mnt1 anymore. The midnight comander (mc) shows that folder in red color with the name ?mnt1 also after
2012 Feb 25
1
RFT: Use Greek semicolons for comdlg32's printer status enumeration?
Request For Translators<g> So what I've gathered from Wikipedia is that the Greek language does not use semicolons as a separator for enumerations: http://en.wikipedia.org/wiki/Semicolon#Greek_and_Church_Slavonic | In Greek and Church Slavonic, a semicolon indicates a question, | similar to a Latin question mark.[2] To indicate a long pause or | separate sections, each with commas