similar to: single specs

Displaying 20 results from an estimated 10000 matches similar to: "single specs"

2007 Oct 25
6
Rollbacks, Sqlite3 bug
Okay - so the sqlite bug reported a day or so ago on the list is real bug. I''m going to file something in the tracker for that... I also learned that before(:all)...after(:all) is not wrapped in a transaction, the way before(:each)...after(:each) is. Is there some reason behind this? Can you not wrap transactions inside transactions? Scott
2007 Apr 12
6
RSpec part of two (count ''em, two) GSoC projects
Here is the list of Ruby related projects accepted for GSoC. It includes two very similar projects (seemingly the same project, really, but I''m not saying anything ;) ) using RSpec to build a spec suite for implementations of the Ruby language: http://code.google.com/soc/ruby/about.html I''m, personally, very excited about the implications of this. Thanks to all of you who use,
2007 Sep 04
16
Failure Messages in RSpec
Having used JUnit and Test::Unit, I''m quite used to having the ability to insert a failure message, which helps when tests fail. For instance, the example RSpec that is generated for a model class specifies that the model class is valid. Assuming this were supposed to be true, and it failed, I''ve now got to duplicate the code in the test in order to find out why it
2007 Oct 23
9
Running rails specs outside of the normal project tree
I want to create a spec/regressions directory with various regressions (for my rails project). I tried the following: describe LoginController, "regression for user creation when steves_sister does not exist", :behavior_type => :controller do controller_name :login before :each do @params = { "commit"=>"Create Account",
2007 Nov 18
8
helper methods starting with should
Hi all, As an experiment in playing nice with others, we''ve added the ability in rspec''s trunk to do this: class ThingExamples < Spec::ExampleGroup def should_do_stuff ... end end This is how rspec 0.1 worked, and for people already comfortable with the classes/methods approach of Test::Unit, it is a more comfortable entry point to rspec. For others, however, it
2007 Apr 07
5
Integration Specs On Rails
Now that RSpec is nearing 1 dot oh, are there any plans to implement an integration testing equivalent in RSpec On Rails?
2008 Jun 04
8
Not running correct specs under autotest:
I know this isn''t autotest-users but I''m not sure where else to bring this up: [["app/controllers/contents_controller.rb", Wed Jun 04 14:11:03 +0100 2008]] [["app/controllers/contents_controller.rb", Wed Jun 04 14:11:03 +0100 2008]] /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -S script/spec -O spec/spec.opts spec/models/user_spec.rb
2007 May 24
15
Specs for code stored in rails_app/lib/
Where should the specs go for code in the "lib" directory of a Rails app? I made a folder, "spec/lib/", for storing such specs, and RSpec automatically picks them up when run using "rake spec". Before I go ahead and patch rspec_on_rails/lib/autotest/ rails_rspec.rb so that autotest can monitor these specs I''d like to ask whether this is the
2006 Nov 28
8
view specs with partials
When I first learned about the View specs I was very excited. I still am. However, I haven''t found them useful yet for one reason. They throw the following exception when ever a view renders another view, which is very common. ActionView::TemplateError in ''Event View message'' No rhtml, rxml, rjs or delegate template found for spec/rails/ view_spec/_info
2007 Dec 28
1
JtestR 0.1 released
JtestR allows you to test your Java code with Ruby frameworks. Homepage: http://jtestr.codehaus.org Download: http://dist.codehaus.org/jtestr JtestR 0.1 is the first public release of the JtestR testing tool. JtestR integrates JRuby with several Ruby frameworks to allow painless testing of Java code, using RSpec, Test/Unit, dust and Mocha. Features: - Integrates with Ant and Maven - Includes
2008 Jan 23
6
sharing specs in a subclass
Hi I''ve spec''d a class and they pass. Now I''d like to assure that any subclass of this class also passes the same specs. Any suggestions for a clever way to handle this? I''d prefer to keep the existing specs as is (eg instead of moving everything into shared behaviors, or doing something to all the ''describe'' lines) thanks linoj
2007 Jan 09
9
Date Approximation in Specs
The floating-point expectations allow for an error tolerance. Is there any similar facility for dates? For example, say I have a custom class that handles date/time spans and I want to spec it: context "A DateRange span" do specify "should know when a week ago is :)" do d = DateRange.new d.last_week.should_be_close_to(1.week.ago, 24*60*60) end end The idea
2008 Jan 13
4
TextMate bundle not compatible with nested specs for running focused tests?
Seems like the recently updated (and wonderful) textmate bundle does not take into account running individual tests that are in nested specs. Anybody else notice this? Any ideas? Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20080113/15d5cc2f/attachment.html
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:
2009 Oct 14
14
spec-ing private methods?
On Wed, Oct 14, 2009 at 5:49 PM, Scott Taylor <scott at railsnewbie.com> wrote: > > On Oct 14, 2009, at 3:36 PM, Joaquin Rivera Padron wrote: > > hello there, > how do you tipically spec private methods? The thing is ? have something > like this: > > def some_method > ?? complex_method + other_complex_methods > end > > private > def complex_method...
2007 Feb 01
3
Structure for library code specs
Hi Are there any plans to add a structure for library specs, eg RAILS_ROOT/spec/lib ? There''s no equivalent spec:libraries task, and any spec lines for library code are lost from the rake stats output. Ashley
2006 Nov 30
3
model stubs with view/controller specs: error_messages_for??
How would I set up a model stub so that <%= error_messages_for ''some_model'' %> doesn''t complain? I started going down this road: @some_model.stub! (:errors).and_return(ActiveRecord::Errors.new) but it seems like a long, hopefully uneccessary road. Cheers, Michael
2007 May 24
25
Specs for ApplicationController, where to put them?
The Rails ApplicationController (app/controllers/application.rb) serves as an abstract superclass for all other controllers in a Rails application and is a good place to put methods and filters which you want all of your controllers to use. In my case I''m using it to provide methods such as "current_user" and "logged_in?" etc. By default, RSpec
2008 May 23
10
View Specs vs. Stories
Do RSpec stories make view specs redundant? Does anybody spec their views *and* use stories, and if so how? Any views (no pun intended) appreciated. ~ Thanks Mark -- Posted via http://www.ruby-forum.com/.
2009 Sep 30
10
Can't run specs after upgrading gems... get 0 tests, 0 assertions...
So after I updated all my gems, I started getting: /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/ dependencies.rb:105:in `const_missing'': uninitialized constant Test::Unit::TestResult::TestResultFailureSupport (NameError) from /Library/Ruby/Gems/1.8/gems/test-unit-2.0.3/lib/test/unit/ testresult.rb:28 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in