similar to: rspec_on_rails - necessary to force "test" env?

Displaying 20 results from an estimated 10000 matches similar to: "rspec_on_rails - necessary to force "test" env?"

2007 Feb 23
0
Using rspec_on_rails without a test
Looks like you can run rspec w/out hitting the database by doing the following: 1. Setting up a new rake task which does not have db:test:prepare as a dependency: namespace :spec do desc "Run the specs under spec/models without a database" Spec::Rake::SpecTask.new(:models_no_db) do |t| t.spec_opts = [''--options'',
2007 Sep 27
1
rspec_on_rails: controller method not getting called
In my rspec_on_rails controlle rspec, I have this: require File.dirname(__FILE__) + ''/../spec_helper'' describe FooController, "with a foo" do it "should be false" do get ''index'' assigns[:foo].should be_false end end In my controller I have this: class FooController < ApplicationController def index @foo = FALSE end
2007 Dec 09
1
[rspec-devel] rspec_on_rails (trunk - r3070) works with Rails 2.0.1
I figured most of it out. The Spec::Rails stuff was something in the code which has been fixed by revision 3099. The test methods partially make sense. Since the test/unit code has been integrated, methods with test in them are automatically turned into specs. However, the test? method is in a lib file that isn''t directly loaded into the specs. It is a convenience method: def
2007 Nov 08
0
error on migration
Hi all, I''m just getting started with rspec. I''m using trunk rspec with edge rails. I get an error on migration though, here it is: rake db:migrate RAILS_ENV="test" --trace (in /home/pat/railsapp) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment rake aborted! undefined method `failure_message'' for class
2007 Mar 19
0
action_web_services error with rspec_on_rails
I now have two specs in my rails project which correspond to one rails controller. I can run them individually and they pass, but running them together (either with the rake task just putting both files on the command line): euclid% spec spec/controllers/crud_resource_controller_spec.rb spec/ controllers/crud_resource_controller_with_join_models_spec.rb
2008 Mar 16
0
Corrupt rspec_on_rails tar file?
I just downloaded rspec_on_rails-1.1.3.tgz onto a mac on OSX 10.4 and another computer (Ubuntu 7.10) and I get the same tar errors when I try to decompress: rspec_on_rails-1.1.3/spec_resources/views/view_spec/implicit_helper.rhtml rspec_on_rails-1.1.3/spec_resources/views/view_spec/multiple_helpers.rhtml gzip: stdin: decompression OK, trailing garbage ignored
2007 Jun 13
0
Using Rcov with rspec_on_rails
Running the defualt task which comes with rspec gives me the following: ======================================================= euclid% rake spec:rcov (in /Users/smtlaissezfaire/Sites/rails/changelog) ................................*..*..*...................*............. ................................... Finished in 5.751487 seconds 107 examples, 0 failures, 4 not implemented No file to
2006 Nov 22
0
rspec_on_rails MissingSourceFile
Hi there, I''ve installed rspec, rails plugin & generators thusly: $ sudo gem install rspec $ sudo gem install rspec_generator $ sudo gem install zentest -v 3.4.1 $ ./script/plugin install svn://rubyforge.org/var/svn/rspec/tags/REL_0_7_2/vendor/rspec_on_rails/vendor/plugins/rspec $ ./script/generate rspec $ ./script/generate rspec_model ModelName With Rails version: $ rails
2006 Nov 22
1
rspec_on_rails (MissingSourceFile)
Hi there, I''ve installed rspec, rails plugin & generators thusly: $ sudo gem install rspec $ sudo gem install rspec_generator $ sudo gem install zentest -v 3.4.1 $ ./script/plugin install svn://rubyforge.org/var/svn/rspec/tags/REL_0_7_2/vendor/rspec_on_rails/vendor/plugins/rspec $ ./script/generate rspec $ ./script/generate rspec_model ModelName With Rails version: $ rails
2006 Nov 24
0
rSpec REL_0_7_2 rspec_on_rails (MissingSourceFile) >> Fixed in trunk
Hi Aslak, Thanks for the help. That bug is fixed in trunk. Here''s my path to recovery ... $ svn co svn://rubyforge.org/var/svn/rspec/trunk ~/tmp/rspec $ cd ~/tmp/rspec $ rake gem $ sudo gem install pkg/rspec-0.7.3.gem $ ./script/plugin install --force svn://rubyforge.org/var/svn/rspec/trunk/vendor/rspec_on_rails/vendor/plugins/rspec $ ./script/generate rspec (required to regenerate
2007 Jun 27
1
rspec_on_rails: assert_select wrapper doesn''t play nice with XML
Hey, I''m using rspec and rspec_on_rails to test some RSS feed views, the problem is that the specs spew out messy warnings when they run: ignoring attempt to close channel with link opened at byte 61, line 3 closed at byte 141, line 5 attributes at open: {} text around open: "ss version=\"2.0\">\n <channel>\n <title" text around close:
2006 Dec 07
3
Newbie Error Running specs
I''m new to rspec. I just installed these: rspec (0.7.4) RSpec-0.7.4 (r1201) (rspec gem) rspec_on_rails .3 plugin (on vendor/plugin) I''ve set up a simple spec - spec/library/test_spec.rb: require File.dirname(__FILE__) + ''/../spec_helper'' context "test context" do setup do #nothing end specify "nothing to specify" do
2007 Nov 14
0
rspec_on_rails, receive_and_render experiment
A recent exploration on receive_and_render to assist with some common view spec''ing can be found at http://www.continuousthinking.com/2007/11/14/rspec_on_rails-render_and_receive_matcher Suggestions and feedback are welcome. Thanks, -- Zach Dennis http://www.continuousthinking.com -------------- next part -------------- An HTML attachment was scrubbed... URL:
2007 Jul 26
0
rspec_on_rails magical incantations
I ran into something really puzzling today. I don''t know exactly why it''s happening, but I thought I''d share my experiences. I started a dummy app just to test an idea outside of the context of my real work today. So, I quickly get things started: * rails junk * cd junk * ruby script/plugin install svn://rubyforge.org/var/svn/rspec/tags/ CURRENT/rspec * ruby
2007 Jun 01
0
rspec_on_rails, could someone provide an example of using mocks/stubs?
hi all I''m still a little uncertain on how to use mocks/stubs with rspec when dealing with associations. I know the point is to isolate the code being tested and remove external dependencies, but I''m not sure how to implement it. Can someone suggest how they would spec the code below: I have a Book model and Review model class Book < ActiveRecord::Base has_many :reviews
2007 Dec 07
0
rspec_on_rails (trunk - r3070) works with Rails 2.0.1
After a couple of quick fixes this morning, rspec_on_rails (in trunk as of rev 3070) now works correctly with Rails 2.0.1 Now that Rails 2.0 is out, we''ll try to get an RSpec 1.1 release candidate out the door in the next few days. Cheers, David
2006 Dec 27
2
DB-less rspec_on_rails
Hi! I''m still struggling with RSpec to get it working with a Rails application, that does not use a database. I removed all the db:* dependencies from the RSpec targets, but it still wants to connect to a database. Any ideas? bye, Tobias ** Execute spec:models /usr/bin/ruby1.8 -I"/var/lib/gems/1.8/gems/rspec-0.7.5/lib"
2006 Jan 11
1
logger in my classes
Hi, I wrote a class which is not an AR extension, nor a controller. I''d like to use logger.* methods there too. My class is in lib/ dir. I include it in environment.rb with the line require ''lib/localization'' just after the line require File.join(File.dirname(__FILE__), ''boot'') I tried many ways to reuse the logger class. The cleaner way seemed to
2007 Apr 04
1
pontential bug in rspec_on_rails and ActiveRecord transactions
Hello rspec-users, I''ve encountered a strange bug in rspec, but it may be me who is wrong. I''m running latest version from the trunk (r1678) of both rspec and rspec_on_rails. Please consider the following model: class Url < ActiveRecord::Base def after_save Contact.create!(:primary_email => ''user at example.com'') raise
2006 May 25
2
Capistrano only runs migration against production env?
All, Just read in the Capistrano manual about the Capistrano "migrate" task. There it says that: "By default, all this task does is change to the directory of your current release (as indicated by the current symlink), and run rake RAILS_ENV=production migrate. You can specify that it should run against the latest release (regardless of what the current release is) by setting