Displaying 20 results from an estimated 3000 matches similar to: "Shoulda"
2007 Apr 13
3
rspec on rails won''t install
Hi:
This command:
svn co svn://rubyforge.org/var/svn/rspec/tags/REL_0_9_0/rspec_on_rails/vendor/plugins/rspec_on_rail
Gives me this output:
svn: URL ''svn://rubyforge.org/var/svn/rspec/tags/REL_0_9_0/rspec_on_rails/vendor/plugins/rspec_on_rails''
doesn''t exist
If I go the ''script/plugin install'' route, I get "Export complete."
Anybody know
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 26
8
Renaming RailsExample to RailsExampleGroup
Fyi, I made the following renames:
* RailsExample -> RailsExampleGroup
* FunctionalExample -> FunctionalExampleGroup
* ControllerExample -> ControllerExampleGroup
* ViewExample -> ViewExampleGroup
* HelperExample -> HelperExampleGroup
* ModelExample -> ModelExampleGroup
This was done to keep the naming consistent with ExampleGroup.
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 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 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 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 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 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 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
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 Nov 13
7
rails story runner returning a nil response code
Has anyone noticed any problems with the Rails story runner returning
a response code of "0" when doing get/post/etc methods? I just
grabbed the latest rails/rspec and just started noticing this problem,
http://pastie.caboo.se/117497
Regular controller specs pass as expected.
--
Josh Knowles
phone: 509-979-1593
email: joshknowles at gmail.com
web: http://joshknowles.com
2007 Mar 29
21
a better "should have valid associations"
This is pretty much the same as last time around, if you recall.
Thanks to Wilson for converting to the new form. I''ve added a few
lines. Basically, it iterates over your model associations and does
two things.
- First, just try to call the association. Usually fixes speeling
erors or other such silliness.
- Second, try to find a record with an :include on the association.
This
2007 May 30
18
autotest and rspec_on_rails not happy
Hi,
I''ve been using the rspec and rspec_on_rails plugins quite happily on
my Rails project for a while now. Today I noticed the autotest
support in RSpec-1.0.3 and decided to give that a spin.
Oh tragedy!
$ autotest
loading autotest/rails_rspec
./vendor/plugins/rspec_on_rails/lib/autotest/rails_rspec.rb:33:in
`initialize'': undefined method `singularize''
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 Apr 13
21
ZenTest autotest now handles RSpec, yay!
Josh Knowles http://joshknowles.com/ just let me know that ZenTest Autotest
3.50 now handles your RSpec specs.
http://blog.zenspider.com/archives/2007/04/zentest_version_350_has_been_released.html
That''s a great news.
Josh also shared with me a quick hack to make autotest work with only the
RSpec plugin installed.
Add the following into your ~/.autotest file