Displaying 20 results from an estimated 6000 matches similar to: "Stories and Pending Actions"
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 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
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 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 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 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 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 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 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 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
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
2008 Jan 21
6
Rspec 1.1.2 on Windows
I am using Rspec 1.1.2 on Windows XP SP2
I am receiving the following error when I run ''rake spec'' from a brand new
project:
C:/SVN_Projects/rspec/vendor/plugins/rspec/lib/spec/runner/options.rb:107:in
`colour='': You must gem install win32console to use colour on Windows
(RuntimeError)
I have the win32console gem installed and the error still occurs. It seems
that the
2007 Nov 23
12
namespaced controllers
Out of curiosity, I''ve seen the following fail:
module Admin
describe MyController
...
end
end
But this works fine:
describe Admin::MyController
..
end
Why?
Scott
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/.
2008 Mar 19
3
svn externals and git submodules
This is a request to split up the repository into at least two repositories
rspec
rspec_core (loaded as svn_external or git submodule)
rspec_on_rails (loaded as svn_external or git submodule)
We could load the plugins the same way as before
ruby script/plugin install http://rspec.rubyforge.org/svn/trunk/rspec_core
ruby script/plugin install
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.