similar to: Getting Class in Shared Behaviours

Displaying 20 results from an estimated 2000 matches similar to: "Getting Class in Shared Behaviours"

2007 Nov 19
5
Stories and Pending Actions
I can''t get my plain text stories to show pending actions like the example addition plain text story. Any tips? (See below) http://pastie.caboo.se/119627 Nathan Sutton fowlduck at gmail.com rspec edge revision 2910 rspec_on_rails edge revision 2909 rails edge revision 8167
2007 Nov 21
2
When you sometimes wonder how to test this??
Hi Just something that I have been finding very helpful sometimes when I am stuck with "how could I test this?" moments is looking at the Rails test suite. At the moment I am working on testing our custom error_messages_for methods and I have found looking at how the Rails tests in active_record_helper work helpful :-) So just thought I''d share that. Have
2007 Nov 20
9
Testing Models without fixtures
Hi, I would like to test a sorting method that is in the user model, it''s a class method called search. What I would like to do is create 2 users and load the test database with just those 2 users, so that I can call User.search("john") and it would return those two users. Not sure how to clear the test database and populate it just with these 2 users for that specific
2008 Jan 10
21
Shoulda
Hey, we''re currently using shoulda (http://dev.thoughtbot.com/ shoulda/) on a project and I saw some things that would be really nice to see in rspec, namely the should_ methods, and especially the should_be_restful method. Do these go against the rspec goals at all? Or could an ambitious programmer go to town implementing these for rspec_on_rails? Nathan Sutton fowlduck at
2007 Dec 11
5
RSpec TMbundle
I tried checking it out today using instructions here: http://rspec.rubyforge.org/tools/extensions/editors/textmate.html I get a ''svn: Connection closed unexpectedly''. Did it move or is it down? Nathan Sutton fowlduck at gmail.com rspec edge revision 3052 rspec_on_rails edge revision 3049 rails edge revision 8269
2007 Nov 15
3
How to Run Rails Stories
I have non non-plain-text story without any steps_for, can it be run? If so, how? Thanks, Nate
2007 Nov 30
4
Autotest''ing specs on non-rails app
I''m having trouble using autotest with rspec on a non-rails project. my Rspec gem is version 1.0.8, ZenTest is 3.6.2 project structure $ ls * lib: parser.rb spec: parser_spec.rb autotest finds and runs the spec, but it won''t detect changes to lib/parser.rb I know it''s something stupid, but... help? -- Rick DeNatale My blog on Ruby
2007 Aug 06
2
used the described Class in a shared behavior
Is it possible to access the described class in a shared behavior? I''m trying to do something like this: describe "Siberian feline", :shared => true do described_class_instance_as :feline, :name => "fluffy", :breed => "Siberian" # or maybe before(:all) do @feline = described_class.new(:name => "fluffy", :breed =>
2007 Nov 15
7
Plain Text Stories Chaining Scenarios
I''m writing a plain text story (testing the waters) and I have scenarios that I need to chain in my specs. Here is what I have so far: Story: User purchasing tshirts As a user I want to checkout So that I can purchase shirts Scenario: User goes to checkout with nothing in cart Given a user And user has an empty cart When user goes to checkout Then user
2008 Jan 13
10
.html.erb files and autotest
When I work with a .html.erb file, the autotest rspec on rails stuff doesn''t understand the file to map it to the right test. I wanted to submit a patch for this, but I''m unsure where the specs would be to update. I found the necessary mapping in rspec_autotest.rb, but I can''t find any specs anywhere. Help? I just need to have /app/views/coupon/index.html.erb to map to
2007 Dec 03
5
spec for model_id should eql
Hello, I''m confused why the spec described below is failing. Other simple comparison specs are passing fine for the same model. The code is working accordingly when I test it through the console, I''m just having difficulty getting this spec to work. Any pointers would be appreciated. Failure message: ''Address fetch and geocode should extract department and write to
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 Dec 11
6
Rspec 1.0.8 with Rails 2.0
Is it OK to go ahead and generate a Rails 2.0 project with RSpec 1.0.8? Am I likely to run into problems? Would it be best advised to wait or can I go ahead now? Thanks, Yitzhak -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20071212/c6fcea0f/attachment.html
2007 Oct 04
5
Specs and Libs
How would I go about writing specs for a lib, particularly one with all protected and private methods. I''m trying to spec the AuthenticatedSystem library from the rails restful_authentication plugin: http://pastie.caboo.se/103625 Also, when you''re mocking objects, a side-effect is helping you define the api of the object. Is there a way to get all the behaviors that
2007 Nov 14
5
ETA to Stories
Hey guys, just poppin in to ask if anyone knows when stories will be somewhat stable? We''re starting to use integration tests at work, we''re already using rspec, and I''d like to avoid integration tests if possible. Thanks, Nate "fowlduck" Sutton
2008 Jan 18
4
Spam Protection
I was disgruntled with the amount of spam I was getting, so I started setting up accounts for the various mailing lists I listen to. I use rspec at showcase60.com to read the mail here. Along with the rspec news that comes over this channel, I''m getting more and more spam addressed to this same account, which means that the open way this list passes around email addresses is
2007 Nov 23
3
Creation of spec.opts spec_helper etc
When do these files, along with lib/spec and lib/spec_server get created? I tried to create a quick test project and can''t remember how they were created in a previous project. Thanks -- Posted via http://www.ruby-forum.com/.
2007 Mar 01
1
Problems with RC1 & Rails Controllers
I''m now using the 0.8.0 RC1 gem and have the same version of rspec and rspec_on_rails checked out into my vendor/plugins directory. I''m having a problems with controllers... I''ve generated a controller using the ./script/generate rspec_controller MyController. When I try to run the rake spec:controller task I get the following: euclid% rake spec:controllers (in
2007 Mar 01
4
RC1, Rails, and problems with multiple options in spec.opts
I am having inconsistent output with multiple options in the spec.opts file. I can, for instance, pass --color or --colour, or, separately, use --drb. But when combining them I get: /opt/local/lib/ruby/1.8/optparse.rb:1381:in `complete'': invalid option: --options --color --drb (OptionParser::InvalidOption) from /opt/local/lib/ruby/1.8/optparse.rb:1379:in `catch''
2007 Jun 11
3
hpricot as dependency for building rspec?
It looks to me that hpricot is a dependency to building rspec: euclid% rake pre_commit (in /Users/smtlaissezfaire/ruby/projects/rspec/hpricot) rake aborted! Could not find RubyGem hpricot (>= 0.0.0) /Users/smtlaissezfaire/ruby/projects/rspec/hpricot/rakefile:9 (See full trace by running task with --trace) Let me know if I''m wrong. Otherwise, I''ll submit a patch in the docs.