similar to: How do I change www.example.com in rspec tests?

Displaying 20 results from an estimated 100000 matches similar to: "How do I change www.example.com in rspec tests?"

2009 Jan 16
3
rspec model testing - test on user defined validation- How do I test that the create failed.
I''m new to rspec and looking for way to test a validation I added to a model. The test checks to see that if field1 has a value then field2 must be nil and vice versa. ------------------------------- When I did the rspec_scaffold it generated one test which worked before :each do @valid_attributes = { :field1 = "value for field1" :field2 = "value for
2007 Dec 27
3
RSpec on Ruby 1.9: before(:all) (Not Yet Implemented) pending messages instead of tests
On Dec 27, 2007 3:18 PM, Shot (Piotr Szotkowski) <shot at hot.pl> wrote: > Shot (Piotr Szotkowski): > > > I happily hand-compiled Ruby 1.9.0-0 into /home/shot/opt/ruby today > > and I''m running into a strange error with RSpec ? all my examples work > > perfectly with Ruby 1.8 but are considered peding on Ruby 1.9. > > FWIW, I get the same result with
2011 Apr 15
7
warning: toplevel constant XYZ referenced Admin:XYZ
I have an odd problem. I got controllers in a namespace and controllers outside of the namespace. For example, I have a PagesController and a Admin::PagesController. When I run rspec from the top, tests pass and I get the following warning: spec/controllers/admin/pages_controller_spec.rb:4: warning: toplevel constant PagesController referenced by Admin::PagesController This makes no sense. I do
2011 Jul 28
2
RSpec, shoulda-matchers and Rails model attributes validations
I was trying out RSpec framework in a project and got stopped doing the unit test of a model. In particular, doing the test for the associations and the ActiveRecord validations. I started writing the validations but my tests didn''t look DRY at all. Before refactoring the tests checked out and look for other people solutions. I found out shoulda-matchers and Shoulda (which if I
2006 Dec 17
0
Best way to do automated acceptance tests
Hi This is only part related to rspec but I asked the Rails list and didn''t get a reply so I thought I''d try here. Basically, since rspec_on_rails doesn''t have an equivalent to rails integration tests, I''m trying to find a way of doing automated acceptance tests. I''ve found selenium and watir, but I''m struggling to tell the two
2012 Jul 06
0
Running Rspec tests with JRuby fails
How to run RSpec tests with JRuby in a Java project? I tried to run it with JRuby 1.7.0.preview1, rspec (2.10.0) rspec-core (2.10.1) rspec-expectations (2.10.0) rspec-mocks (2.10.1) rspec-rails (2.10.1) as follows: jruby -S rspec and got the error: javix at ubuntu:~/Development/rspec_jruby$ jruby -S rspec spec NameError: cannot load Java class com.models.Calculator for_name at
2006 Dec 21
1
heres how to get color output in rspec_autotest with rspec 0.7.5
In case anyone else is trying to make this work, here is what I did (Before 0.7.4 I had patched the regex in zentest redgreen, but that is not used any more) To use directly, it is very simple. In rspec_autotest/lib/ rspec_autotest.rb, add a -c to the spec_command in the initializer function: @spec_command = "spec -c --diff unified" This won''t help however if you want
2007 Oct 12
1
Edge rspec - running Test::Unit tests
With rspec 1.0.8 I can run Test::Unit tests and rspec tests using: rake default and all tests and specs run. With edge rspec the Test::Unit tests return with the message: [list of tests] Finished in 4.5e-05 seconds 0 examples, 0 failures How can I get Test::Unit and rspec to happily co-exist again? Thanks, Alvin
2009 Mar 15
0
rspec-rails 1.2.0 Released
rspec-rails version 1.2.0 has been released! * <http://rspec.info/> * <http://wiki.github.com/dchelimsky/rspec> * <http://wiki.github.com/dchelimsky/rspec/rails> * <http://wiki.github.com/dchelimsky/rspec/upgrades> Behaviour Driven Development for Ruby on Rails. Changes: ### Version 1.2.0 IMPORTANT INFORMATION: Due to changes in Rails-2.3, there are some changes in
2008 May 30
2
Any good Rails example app created with RSpec and Rspec on Rails?
Hi, I''m pretty new to RSpec. I''ve been browsing http://opensourcerails.com to find a good app built using RSpec (and RSpec on Rails). Does anybody have a recommendation? I wanna see example of mocks/stubs, associated models and integrated_view. -T
2010 Nov 10
0
no output from rspec -- fixed
Resend from 10/29/2010 due to bounce back. This is in reference to an email sent to the group on On Oct 18, 2010, at 1:24 AM. Short version: The solution was indeed to downgrade to test-unit 1.2.3 gem ''test-unit'', ''1.2.3'' Longer version: I went through my github repository and found a version of my gemfile that worked with rspec. I then carefully compared
2010 Sep 22
0
rspec-rails 1.3.2 tests get loaded, but not executed
Hello, Can anyone please help me with the following issue I am running rspec-rails 1.3.2 with rails 2.3.9 on ruby 1.8.7 Unfortunately my tests don''t execute at all after i updated these gems although i followed the update insturctions. After some debugging i found that the describes and examples get created, but they never get registered with ExampleGroupFactory.add_example_group and
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:
2007 Sep 17
3
how do I get the beautiful html rspec results in textmate?
I''m going through PeepCode RSpec Basics and he gets a beautiful rspec results page in html when he presses a hotkey in TextMate. I would guess it''s along the lines of Apple + R but I don''t get the same results and I''m using the same bundle. -------------- next part -------------- An HTML attachment was scrubbed... URL:
2008 Jun 12
0
Mysterious interaction between RSpec 1.1.4 and has_finder/named_scope
I just opened a Rails ticket on a problem with named_scope in Rails 2.1, and cross-posted a message here which I send to rails-core. I''m still a bit mystified, because I''m having a problem caused by this on RSpec 1.1.4, but not on 1.1.3, and I don''t see a difference in code which would explain it. The basic problem, which I encountered upgrading our rails app to RSpec
2007 Nov 07
1
LoadError when upgraded to latest rspec trunk
I just moved my rspec and rspec_on_rails plugin from r2691 to r2822. After that I upgraded both of them I regenerated all things rspec with the rspec generator. I was running on rails r2691 but upgraded to the latest at r2822 when I was getting errors but that still didn''t help things. I get the following when I try to run a spec with either rake spec or ./script/spec:
2008 Mar 20
1
Combining autotest, rspec, rspec_on_rails and spec-server
Hello, I''ve been trying to google the definitive way to combine autotest, rspec, and spec-server, but to no avail. It seems like there are lots of suggestions from old versions. Furthermore, some commands such as rake:autotest don''t seem to be around anymore. So, is it required to install ZenTest as a gem? I have version 3.9.1. I believe this gets me the autotest
2006 Aug 26
1
ANN: RSpec 0.6.2
I just released RSpec 0.6.2 Hopefully this fixes the couple of glitches that went into 0.6.1 - the RSpec rake task was heavily refactored in 0.6.1 and didn''t work properly when packaged as a gem. This should be fixed now. Holler if things are still broken. Cheers, Aslak
2007 Sep 10
1
Using Rspec with ScenarioFixtures
I am currently trying to get Rspec to work with ScenarioFixtures. http://code.google.com/p/fixture-scenarios/ http://errtheblog.com/post/7708 I did a quick search and didn''t find any mention that any one else had gotten this to work yet. If i missed something, could you please drop me a line. Otherwise, expect a progress report when i get this working... Bret -------------- next part
2008 Apr 09
1
rspec SQLException problem
hello: I just installed rspec 1.1.3 by doing this: gem install rspec and then in the root of my project, I did this: ruby script/plugin install svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec_on_rails And now, when I run a unit test (that worked before the rspec installation), I''m getting the following errors: SQLException: near ''of'': syntax error: DELETE FROM