similar to: Specs and Libs

Displaying 20 results from an estimated 1200 matches similar to: "Specs and Libs"

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
2008 Jun 15
2
RSpec story failing because of routing error on "/"
Greetings! Here''s the problem. When running tests on the restful_authentication plugin, I am getting a routing error on "/". Which I don''t really understand, because the route "/" certainly does exist as I can confirm when I run ./script/server and point my browser at http://localhost:3000/ Here is an example of the error I am getting when I run
2008 Mar 14
1
how do I get a older version of restful_authentication
I''m currently running rails 1.2.6 and I''ve got the new restful_authentication running, unfortunately, the new version of the plugin does not support the older rails very well. how can I get an older version of restful_authentication (pre rails 2.0.2)? I''m getting this error: undefined method `authenticate_with_http_basic'' when I put "include
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
22
Getting Class in Shared Behaviours
Hi, I want to be able to get at the described class in my shared behaviour. I''m sure an example will say it better than my words describe "my shared", :shared => true do it "should tell me what the class is its describing" do how_do_i_get_the_user_class_here end end describe User do it_should_behave_like "my shared" #... end So in my
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 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
2009 Jan 09
14
undefined local variable or method `current_user' for
Hi All, I am using a Plugin mdarby-restful_acl with restful_authentication and I am following the procedure form http://github.com/mdarby/restful_acl/tree/master , but I am getting some irritating error "undefined local variable or method `current_user'' for", I know I am missing something but I dont know what? Can anybody help me regarding this? Shahroon
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 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
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
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 30
2
Where can I get "authenticate_with_http_basic"?
Hi, I just installed Rails 2.0.2 [root@mymachine easyx]# ruby --version ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-linux] [root@mymachine easyrx]# gem install rails --include-dependencies Need to update 16 gems from http://gems.rubyforge.org ................ complete Successfully installed rails-2.0.2 [root@remandev easyrx]# But I''m getting this error in my restful_authentication
2007 Mar 06
15
mocking missing methods
Hi folks. So I''m using mocha on a ruby project, and I really like it. One thing I''ve noticed is that it can be a bit "surprising" when I''m mocking methods that don''t exist on an object, and I think there''s an easyish fix. At the moment, you use sheep = mock() to create a mock sheep. What I''d like to do is something like sheep =
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 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 Dec 20
19
Story runner rake task
What''s the status on a rake task for the story runner. If nothing is in progress, where could I start to try and build one? JD
2008 Apr 10
7
Facebooker and existing website?
Hi I am trying to use facebooker with an existing website that already has a model named ''User''. I therefore created a model called BkUser for use with facebooker. Also I have different controllers for all facebook requests. I am using acts_as_authenticated for handling login etc for my website and everytime a user is logged into my facebook app and tries to also browse the