similar to: Specs for RJS HTML output NOT containing an element

Displaying 20 results from an estimated 400 matches similar to: "Specs for RJS HTML output NOT containing an element"

2007 Oct 16
6
RailsStory runner - empty response
I generated a new rails app then installed rspec and rspec_on_rails from trunk. I then created a sample story: require File.dirname(__FILE__) + "/helper" Story "View Home Page", %{ As a user I want to view my home page So that I can get a birds eye view of the system }, :type => RailsStory do Scenario "Publisher with no videos" do When
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
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
2015 Mar 09
5
Notes on building a gcc toolchain for Rtools (but not multilib)
Hi, [This is a follow-up to the "New version of Rtools for Windows" thread in January, but I just subscribed and don't know how to reply to an old thread -- my apologies.] I was able to use the nuwen distro to build a gcc 4.9.2 toolchain and use it to build the latest R-patched with it. Below are some notes about what I did; I hope they will be useful for keeping Rtools
2006 Nov 08
1
controller.session not same as session?
> context "A user logging out" do > fixtures :users > controller_name :account > > setup do > login_as :quentin > users(:quentin).remember_me > request.cookies["auth_token"] = cookie_for(:quentin) > end > > def logout > get :logout > end > > specify "should unset :user in session" do
2007 Mar 01
2
error_on is deprecated?
The docs say DEPRECATED. See Spec::Rails::Expectations model.should_have(:no).errors_on(:attribute) model.should_have(1).error_on(:attribute) model.should_have(3).errors_on(:attribute) However the rdoc for Spec::Rails::Expectations shows the same code. The only difference is that it''s "model.should have(1).error_on(:attribute) instead" So is error_on itself deprecated, or is
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
2015 Mar 09
0
Notes on building a gcc toolchain for Rtools (but not multilib)
On 08/03/2015 10:02 PM, Hsiu-Khuern Tang wrote: > Hi, > > [This is a follow-up to the "New version of Rtools for Windows" thread > in January, but I just subscribed and don't know how to reply to an > old thread -- my apologies.] I am planning to put a new Rtools online today that uses a different build of gcc 4.9.2. I will be concentrating on getting it to work
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
2007 Jan 16
2
Specifying the contents of a date selector
Another n00b question (can you tell I don''t normally write view code yet???)... I''m using the date_select form helper to give me three select popups, (day, month, year). I want to specify that these exist and are set to today''s date I''ve tried this: response.should_have ''form > p > select
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 =
2007 Feb 12
6
Specs for Ajax partials with unicode characters
Hi Not sure if this is more Rails or RSpec related... I''ve got an app with an RJS view that updates a div in a page with the contents of a partial. The partial contains a non-ascii character namely a pound sign. I set up a simple test app with this RJS view: page.replace_html("test_div", :partial => "test_action") and this _test_action.rhtml:
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
2007 Oct 17
16
rspec causing validates_presence_of to validate twice?
I had posted this on the regular Rails list, but upon trying this in script/console, it seems like the behavior only exists when running rspec. I''m getting some weird behavior in one of my models. I have a model defined something like this class User < ActiveRecord::Base attr_accessor :password validates_presence_of :password end If I validate the model without specifying a
2006 Jun 16
0
rake spec controller test output hideus.
Is there any way to change the output of rake spec fails? The errors are just totally over the top ugly and not helpful. First of all the ruby -Ilib line always comes before each test and I find it distracting. But if an error occurs on something that is not nil it just gives me the entire contents of that object and that is no small matter when the object is a HTTP request response. Here is
2006 Oct 17
3
Should fixtures be transactional?
I started using the new Model.should_have(1).records expectation in rspec_on_rails, and quickly realized that my fixtures were remaining loaded, even in contexts that didn''t use them. Bug or feature? Jay Levitt
2006 Dec 20
8
RSpec 0.7.5
The RSpec Development Team is pleased to announce the release of RSpec 0.7.5. This release adds support for Heckle - Seattle''rb''s code mutation tool. There are also several bug fixes to the RSpec core and the RSpec on Rails plugin. Changes: http://rspec.rubyforge.org/changes.html Download: http://rubyforge.org/frs/?group_id=797 or gem install rspec Happy spec''ing,
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",
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
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"