similar to: How to count examples in one example group

Displaying 20 results from an estimated 60000 matches similar to: "How to count examples in one example group"

2011 Nov 13
2
Rspec not finding my examples
I am following the examples in chapter 2 of "Rails 3 in Action" and for some reason I have to specify the full path + file name to get my specs to run. The book and rspec docs led me to believe that I should be able to just type ''rspec'' and rspec would find any spec files in a directory called spec. I even tried adding a .rspec file with "--default_path spec"
2007 Dec 12
3
Problem running examples with spec_server
Hello, Running RSpec without DRB works fine. However, "spec -X" runs without error but provides no output at all, even though the DRB spec_server seems to be fine. Has anyone got some suggestions as to why and how to fix? RSpec: 1-1-0RC1 build time 20071212145122 RSpec on Rails: Build time 20071212145122 Ruby: 1.8.6 Rails: 2-0-1 Win XP SP 2 Thanks very much, Dave -------------- next
2009 May 25
3
[rspec] http://rspec.info examples are broken
It seems that some examples at http://rspec.info are broken with invalid html. For example: http://rspec.info/documentation/before_and_after.html All those spans there should not be visible, I think :) Isn''t rspec.info web tested well enough? :P Best regards, Jarmo
2007 Nov 07
1
Helper methods starting with should_ get picked up as examples?
Hi! I recently updated my rspec and rspec_on_rails plugins to the tip of the trunk and ran into an issue with helper methods with names starting with should_ in my describe blocks. Fictive example to show what I''m talking about: describe Order do it "Can be paid for" do ... should_have_paid(user) end def should_have_paid(user) end end I know in
2008 May 30
2
Any good Rails example app created with RSpec and Rspec on Rails?
Hi, I''m pretty new to RSpec. I''ve been browsing http://opensourcerails.com to find a good app built using RSpec (and RSpec on Rails). Does anybody have a recommendation? I wanna see example of mocks/stubs, associated models and integrated_view. -T
2008 Mar 11
2
for a beginner - good rspec examples?
I''m learning to use rspec and I want to see some good examples. Any recommendations of open source projects that demonstrate the use of rspec? So far I''ve found: 1) the Caboose sample app (http://sample.caboo.se/) 2) the Altered Beast forums app (http://beast.caboo.se/forums/1/topics/4650 ) Any others come to mind? I''m especially interested in seeing
2010 Nov 03
3
Rake task for focused examples
Hi, Is it possible to make a rake task to run examples with a certain filter on? In this case I want to run rake spec:focused and run only the examples with :focus => true. - Toni
2009 Apr 10
1
where''s an example of an RSpec''d Rails or Merb site with RJS calls?
RSpeckers: The time has come to plug assert_rjs_ into a matcher providing a grammar like "should generate_js_to :replace_html...". Does anyone have a lite website that uses Ajax and RSpec, for a reference implementation? I need non-trivial challenges... -- Phlip
2007 Oct 26
2
Examples of writing controller specs that use authentication
Hello, I''m working on specs for a controller that handles authentication using the restful_authentication plugin. I''m trying to find a resource (tutorial or examples, if possible) about the best way to go about writing mocks and specs to make sure that things like my before_filters are working correctly. Does anyone know of any good resources for this? Thanks, Les
2007 Nov 13
2
More Rails Pattern Examples?
Hi, I have been reading the documentation and examples on the rspec site. There are two "patterns" from Rails that I am not clear how to implement that are kind of related, and so I am not sure how to start. Does anyone have any examples of how to write rspecs for these? 1/ Nested resources. 2/ Resources that are specific to the current_user. In other words, I only want to
2011 Jun 22
0
How do I change www.example.com in rspec tests?
It looks like request.host is set to www.example.com, how do I change that? I want to change it for all tests, and it seems that request is only available within the tests themselves (tried to do it in RSpec.configure but that didn''t work.
2011 Mar 09
1
undefined method `flunk' for #<Spec::Example::ExampleGroup::Subclass_1:0x0000000516bd40>
I''m running into an issue using ONLY rspec version 1.3.3 (no rails / rspec-rails with this project) where i''m hitting the following error: My code looks like this: describe Win32Meterpreter before :all helper_method end def helper_method ## If a session came back, try to interact with it. if @session
2009 Jul 06
3
Rspec book issue (mastermind example)
Hey Everyone, Just a simple question. I have read and re-read the examples and I''m not getting the proper output. I''m on page 73/74 of the Rspec book and it says I should have "4 steps passed". I think the problem is within my /step_definition/mastermind.rb" file. It''s definitely not beyond me to make a mistake, but I have checked and double checked my
2007 Sep 28
2
form action url example
Hi, I have the following example: it ''should have a form with an action attribute'' do response.should have_tag( "form[action=?]", ''/users/1/machines/1/trouble_tickets'') end for a form like so: <% form_for( :trouble_ticket, :url => { :action => ''create'', :user_id => @machine.current_owner,
2008 Oct 08
3
ArgumentError in "is a pending example" - block not supplied
We have a few unfinished examples in our code of the form it "should and does do something" do # stuff end it "should do something someday" it "should and does do something else" do # more stuff end Now since I upgraded my gem to rspec 1.8 today, the empty example is failing with the error ArgumentError in "should do something someday":
2007 Apr 10
5
using YAML for --failures and --examples
As it is currently, in trunk, --failures and --examples except a text file, each line containing the name of a spec. I''m wondering: Would a a patch to use YAML (instead or as well as) plain text be welcomed? I''m thinking of a yaml file like the following: spec_file_1: file: spec/person_spec.rb specs: - should have first name - should provide email address
2011 Nov 18
1
What does :count actually mean in assert_select?
Hi guys, I tried reading up the RSPEC Book (Dec 2010) and googled a bit but I could not find anything. I''m using Rspec2. Example: spec/factories/categories.rb ====================== FactoryGirl.define do factory :category_intakes, :class => ''category'' do name ''intakes and filters'' description ''airfilters and
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 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 Sep 14
0
ProfileFormatter (Top 10 slowest examples)
Hey list, The time it takes for my specs to run is starting to get a little long (~45 seconds), and annoying enough for me to do something about it. I''ve written a simple formatter that prints out the top 10 slowest examples in an attempt to identify any low hanging fruit amongst a spec suite.