similar to: Reason for _spec.rb convention

Displaying 20 results from an estimated 9000 matches similar to: "Reason for _spec.rb convention"

2007 Oct 23
10
How is everyone structuring stories?
Bleeding-edge story-writers, How are you structuring your specs? I am working on a new project and tried this: ./lib ./blah ./spec ./blah ./stories But it breaks autotest, so I moved stories parallel to lib and spec. Also what about suffixes? I have adopted "xyz_story_spec.rb", and "xyz.story" for the time being, with the line runner =
2007 Jun 14
4
Can''t run RSpec files in TextMate
Hi Not sure if this is the place to ask this or not. I''ve upgraded to RSpec 1.0.5, installed the latest TextMate bundle, but whenever I do "Run Behaviour Descriptions in selected files/directories" I get this: /Users/ashleymoran/Library/Application Support/TextMate/Pristine Copy/ Bundles/RSpec.tmbundle/Support/lib/spec_mate.rb:18:in `run_files'': private method
2007 Oct 20
3
TextMate bundle in MacroMates repo
Hi Recently I sent a modified version of the GetBundle bundle to textmate-dev. It was failing because the RSpec bundle was from another repo (ie RubyForge). One of the replies said that the RSpec bundle was now in the MacroMates repo, which it is. Is that an officially handled thing? If so, what version of the RSpec bundle is being maintained there - CURRENT? It''s
2007 Feb 22
9
specking, speccing, or spec''ing
I vote for spec''ing. Anybody else?
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,
2007 Jun 27
2
Controller specs not shareable?
Hi I just wondered if there was a reason why Rails controller specs are not shareable? eg describe "All XHR POSTs to /gap/calculate_quote", :shared => true do controller_name :gap # ... end describe "XHR POST /gap/calculate_quote with valid details" do it_should_behave_like "All XHR POSTs to /gap/calculate_quote" # ... end blows up with
2007 Oct 31
5
Rspec Release Plan (was Am I missing something with Heckle?)
On Oct 31, 2007 11:36 AM, Scott Taylor <mailing_lists at railsnewbie.com> wrote: > When can we expect the next release of rspec? Definitely by the end of November. Likely by mid-November. Hopefully in a matter of days. The next release will be 1.1.0. We''re going to a release model in which 1.odd.x will be considered experimental. This means that while we will document
2007 Feb 23
2
Deferred success for specs?
I''ve started using specs as a to-do list. I write explicitly violated specs so I know what to come back to. But a lot of the time, that means if I start to work on another piece of functionality covered by the same spec, it''s hard to tell what I''m working on now from the explicit failues. I run all my specs through TextMate to use the HTML output, so I go by
2007 Oct 26
7
Weird failing spec
Hi guys, I have a weird failing spec, for which I just cannot figure out the reason of failure. I''m now rewriting my controller specs based on the advice of David and Ashley, and I got stuck on this (see: [rspec- users] specing rescue, ensure and else blocks of an Exception). http://pastie.caboo.se/111221 I''ve tried everything, like stubbing out :update_attributes! , even
2007 Nov 11
8
Autotest with rspec HTML output
Hey all, I was just wondering if any one has played around with getting autotest''s rspec integration working with rspec''s HTML output. I really like how in the rspec textmate bundle the context of the failing code is inlined with the failing spec along with the exact line highlighted and a link to the exact spot in reference. However, I rarely use this nice output since
2008 Apr 29
5
Sharing: dont_repeat_yourself plugin custom RSpec matcher
I wrote a Rails plugin which uses simian to look for duplicates lines in your code and reports in html format, Textmate or Netbeans. I wrote it using RSpec and I have included a RSpec custom matcher: it { rails_application. with_threshold_of_duplicate_lines(4). should be_DRY } If you use Autotest, your specs will fail the next time you do a nasty copy-paste !!! More details in
2007 Oct 31
16
Am I missing something with Heckle?
Hi I can''t get heckle working. In fact, I''ve built an example so simple that it either shows a bug, or I am being really, REALLY stupid. Heckle does not appear to support RSpec directly, so I''m trying to use spec --heckle (RSpec trunk as of 10 mins ago, Heckle 1.4.1). I''ve constructed this pair of sample files: 18> ~/Desktop/heckle_test % cat
2007 Oct 21
8
Interesting shared behaviour side-effect
Given the following ApplicationController specs: describe ApplicationController, "one facet", :shared => true do it ''foo'' ... it ''bar'' ... end describe ApplicationController, "some other facet", :shared => true do it ''abc'' ... it ''xyz'' ... end describe
2008 Mar 17
8
should have_tag outside Rails
Hi Google has not helped me here. I''m looking for a way to use the have_tag assert_select wrapper outside RSpec on Rails (but in a Rails project) so I can use it to check text strings. Has anyone managed this? Thanks Ashley -------------- next part -------------- An HTML attachment was scrubbed... URL:
2007 Oct 21
10
Preferred mock framework
Hi In light of the fact that RSpec mocks are going into maintenance mode in the near future, I was wondering what everyone was switching to. I liked the look of FlexMock most, so gave that a shot. However, there''s a few things that don''t work well with RSpec due to the traditional differences in the way Test::Unit cases are written vs RSpec specs. (One spec per
2007 Feb 28
2
Fixture name not available as class variable in spec
Hi there, I can''t seem to access the fixture name as a class variable from my specs. I have to set the variable in the spec setup. ... [fixtures] my_fixture: id: 1 ... [rpsec] @my_fixture.id.should == 1 ... [error] You have a nil object when you didn''t expect it! The error occurred while evaluating nil.id ... [my setup] RSpec-0.7.5.1 (r1395) - BDD for Ruby Rails
2007 Feb 13
7
Specs of code that use Time.now
Hi Just trying to spec a Rails model that defaults a valid_until date to this time tomorrow. I''ve done something similar involving Dates, and you can stub the :today method to return something fixed. But when I tried this with Time, I found that RSpec calls Time.now four times per spec. So there''s no way to spec code like 1.days.from_now . The best I can come up
2007 Aug 08
9
RSpec book?
<http://www.apress.com/book/bookDisplay.html?bID=10368> Came across this as a stub page browsing Amazon UK. This is good news! I''m surprised it hasn''t been discussed on the list before. Was Chad keeping it a secret? I hope it will have plenty of BDD theory. I''m still waiting for that magic book I can give to someone and say "here - read this, it
2007 Oct 28
4
A better way to stub out constants
Hi Something that''s gnawing at me... to avoid using the SQLite3 gem I''m stubbing it out like this: before(:each) do @database = mock("SQLite3 database") SQLite3 = Module.new SQLite3::Database = Class.new SQLite3::Database.stub!(:new).and_return(@database) end But then it keeps nagging me:
2007 Jul 11
21
"they" synonym for "it"?
I''ve noticed that I phrase a lot of shared behaviours in plural, eg describe "All payment_details views" How about a "they" alias to "it" so you can write describe "All payment_details views", :shared => true do they "should have a card number field" do # ... end end WDYT? Ashley