After updating to Rails 3 and Rspec-rails 2.0, the tasks defined in
rspec.rake do not work anymore. I instead get this, even when running
the rake tasks via 'bundle exec':
* You are trying to run an rspec rake task defined in
* /Users/bessieandkyle/code/listsite/lib/tasks/rspec.rake,
* but rsp
On Sun, Jun 7, 2009 at 9:40 PM, lawrence.pit wrote:
> Hi,
>
> I took a stab at this and created what I call Machinery. So far it
> works great for me.
>
> For those that are looking for a way to create objects in the database
> in a before(:all) instead of a before(:each) to speed up tests, have a
On Mon, Dec 8, 2008 at 11:56 AM, Rupert Voelcker <[EMAIL PROTECTED]> wrote:
> I've had a quick look at the rake tasks for rspec and cucumber (and
> rcov), but not having payed with rake very much I can't at the moment
> get my head around what I need to do so am hoping for some
> guidance
>
> W
On Sun, Oct 26, 2008 at 4:11 PM, Steve <[EMAIL PROTECTED]> wrote:
> Does anyone know if there's a vim plugin out there that will show a tree of
> your describe/it blocks at a glance. Preferably with click ability to go
> right to that location?
It'd be awesome to have a ctags-esque feature for vie
On Wed, Aug 6, 2008 at 1:25 PM, Cohen, Joseph <[EMAIL PROTECTED]> wrote:
>
> Consider:
> should_have_the_same_members_as
Similarly, I have a have_same_elements_as(arr) matcher.
k
___
rspec-users mailing list
[email protected]
http://rubyforge.or
On Sat, Jun 28, 2008 at 5:57 PM, Britt Mileshosky
<[EMAIL PROTECTED]> wrote:
>
> Hello, I'm wondering If I am missing something here when creating an example
> that sets an expecation at the top or beginning of an action but requires you
> to stub / mock everything that follows.
>
> Example:
> I
On Thu, Jun 19, 2008 at 11:56 AM, Christopher Bailey
<[EMAIL PROTECTED]> wrote:
> Kyle, thanks much for sharing your experience. You mention the speed
> and so on. I've read that it is slow. Question: does Autotest work
> the same way with stories, or have a way to detect wh
On Thu, Jun 19, 2008 at 12:32 PM, Lori M Olson <[EMAIL PROTECTED]> wrote:
> Would you have an example of such an exception to share?
>
> Thanks, Lori
The .autotest at the base of one of my plugins, which updates a .sqlite3:
Autotest.add_hook :initialize do |at|
at.add_exception('spec/db/tracks_
On Thu, Jun 19, 2008 at 9:31 AM, Christopher Bailey
<[EMAIL PROTECTED]> wrote:
> Specifically, I'm wondering, or contemplating, if I do unit tests for
> my models, and then I use WebRat plus RailsStory, do I even need to
> then do functional testing of my controllers and views? I can see
> that I
On Thu, Jun 19, 2008 at 9:41 AM, Jim Lindley <[EMAIL PROTECTED]> wrote:
>>> I just got back from RailsConf, and upgraded on of my development apps to
>>> 2.1, and now autotest is going into an infinite loop. It runs tests
>>> continuously instead of waiting for files to be saved before rerunning.
>
On Sat, Jun 14, 2008 at 5:03 AM, Mikel Lindsaar <[EMAIL PROTECTED]> wrote:
> I find myself doing this:
>
> Scenario "logged in user visiting the home page" do
> Given "A logged in user" do
>a_logged_in_user
> end
>
> When "..."
> Then "..."
> end
>
> The a_logged_in_user method is a helper
On Sat, Jun 7, 2008 at 3:16 PM, David Chelimsky <[EMAIL PROTECTED]> wrote:
>> I started with user stories, but the conversion to english was
>> difficult for something largely developer-facing. "When I get
>> /widgets/:id" where :id is actually determined behind the scenes did
>> not read well, and
h of least resistance is probably using the
test/unit tests, followed closely by just sucking it up and having
awkward user stories. My preferred solution would be the
IntegrationExampleGroup, and I may yet get that to work, but I thought
I'd ask here while I sit on it for a bit.
Thanks
Ky
On Tue, May 20, 2008 at 6:59 PM, T K <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a spec
>
> it "should have a unique username "
>
> I have a code:
>
> validates_uniqueness_of :user_name
>
>
> Now, I don't know how to test this code. In order to test this, do I
> need to run `save`?
>
> For exampl
", "Type XYZ in this field", etc. One or two of those don't
bother me, but I move on to more abstract language -- Bryan's "When I
add Zed Shaw" -- once it's solid enough to elide the details.
Sometimes I go back and edit the initial scenarios, sometimes I don'
On Sat, May 3, 2008 at 1:12 PM, Steve Downey <[EMAIL PROTECTED]> wrote:
> Is there more precision than seconds in a Time instance?
>
> irb(main):006:0> a,b = Time.now, Time.now
> => [Sat May 03 11:06:31 -0700 2008, Sat May 03 11:06:31 -0700 2008]
> irb(main):007:0> puts a.to_i, b.to_i
> 1209837991
ng a user, editing them, and removing them. Anything that
does more interesting work is then done separately
(users/reports.story, perhaps), but often relies on the steps for
users/crud to walk through the application and set up the data.
Though, as mentioned in the other thread, sometimes I just use AR
On Fri, Apr 4, 2008 at 7:02 AM, Kamal Fariz <[EMAIL PROTECTED]> wrote:
> Hi Kyle,
>
> I tried the story runner against a story. Unfortunately, it had
> problems executing webrat methods like 'visits'.
>
> Kindly check out this pastie: http://pastie.org/17520
On Fri, Apr 4, 2008 at 5:21 PM, Joe Van Dyk <[EMAIL PROTECTED]> wrote:
> On Thu, Apr 3, 2008 at 7:58 AM, Kyle Hargraves <[EMAIL PROTECTED]> wrote:
> > Hullo all,
> >
> > It sucks to write wrapper .rb files just so stories/all.rb can find
> > and run t
ly do so soon enough.
(Also, specs =)
This is very tied to the layout of my own projects, and I'd be
surprised if it works out of the box for most people. Right now it
does mostly everything I need, so I'm curious what would be necessary
to make it a viable tool for others to use.
ty
;,
should suffice. webrat, for example, wraps its requests in a method
'request_page()', and after every request it calls 'assert_response
:success' so that the story will fail fast.
Kyle
___
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users
projects, and I haven't come up with any features I want lately, so
it's reasonably stable in my experience. Usage examples are available
in the README, and the specs are simple enough to be another good set
of examples.
Suggestions, patches and angry flames
On Tue, Mar 18, 2008 at 9:04 AM, Ashley Moran
<[EMAIL PROTECTED]> wrote:
> On 17/03/2008, Kyle Hargraves <[EMAIL PROTECTED]> wrote:
>
> > We discussed this in a ticket on lighthouse, and I ended up writing a
> > workalike that's sitting atop hpricot. It'
e.
>
> Ashley
We discussed this in a ticket on lighthouse, and I ended up writing a
workalike that's sitting atop hpricot. It's not quite identical, but
generally close enough and so far does everything I've needed:
http://github.com/pd/rspec_hpricot_matchers
Patches and/or suggestions welcome if you need anything else out of it
Kyle
___
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users
Thank you much.
On Fri, Feb 15, 2008 at 12:07 AM, David Chelimsky <[EMAIL PROTECTED]> wrote:
> The source of the bug was a patch that we applied a while back. This
> was after the 1.1.3 release, so if you're using 1.1.3 you're fine. If
> you're using trunk, go ahead and update and you should be
ly
after failures. The problem continues whether I use .autotest files or
not.
This is on a Rails 2.0.2 project, with rspec+rspec_on_rails r3306 in
vendor/plugins, and ZenTest 3.9.1 installed as a gem.
Kyle
___
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users
The REV constants no longer exist in trunk (and haven't for a while),
yet somehow your rspec_on_rails in vendor is still expecting it.
Meaning you don't actually have a copy of trunk in
plugins/rspec_on_rails, I guess.
HTH
Kyle
On 12/28/07, s.ross <[EMAIL PROTECTED]> wrote:
es/all.rb"
end
task 'stories:rcov' do
sh "rcov -o story_coverage --exclude stories stories/all.rb"
end
Kyle
___
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users
tely
worth checking out.
Refs:
http://www.vim.org/scripts/script.php?script_id=1567 - rails.vim
http://biodegradablegeek.com/2007/12/13/using-vim-as-a-complete-ruby-on-rails-ide/
- found this when googling for rails.vim, looks useful
Kyle
___
rspec
a more elegant approach, but the block syntax to
should_receive() could allow something like:
expected_message = Message.new(msg_creation_params)
SantasMailbox.should_receive(:deliver_secret_santa) do |msg|
msg.body.should == expected_message.body
msg.subject.should == expected_message.subject
# etc. if it's necessary
end
Message.create(msg_creation_params)
Feels clunky, though.
Kyle
___
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users
ne and just be explicit
about the module.
describe Admin::FooController
Problem goes away.
I probably shouldn't even call it a workaround -- it's a solution. The
only change is a minor difference in style.
Kyle
___
rspec-users mailing li
rspec's
bug, but never bothered to reply here or update the ticket I filed.
Just did:
http://rspec.lighthouseapp.com/projects/5645/tickets/145-namespaced-controller-load-order
Kyle
___
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users
d up yet and/or this is a bug. Maybe I'm just
being dumb. I have no clue at this time of night/morning.
Thanks
Kyle
___
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users
On Nov 25, 2007 9:23 AM, Kyle Hargraves <[EMAIL PROTECTED]> wrote:
> On Nov 23, 2007 11:53 PM, Scott Taylor <[EMAIL PROTECTED]> wrote:
> > I got an "unknown action foo" error message (wasn't getting it before
> > today - running on trunk).
> >
> &
e specs were passing
fine. I went to add ::SomeController, and the new specs for it passed,
but Admin::SomeController started raising UnknownAction (for all the
actions that weren't defined in the non-admin controller).
But once I restarted autotest, they're passing cleanly, and
..
> end
How has the top one failed? I use it exclusively and haven't ever
noticed a problem.
Kyle
___
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users
; Cheers,
> David
I see people make this mistake fairly often. Is there any reason the
tag shouldn't be renamed to something less counter-intuitive?
Thinking of FreeBSD's tags, RELEASE perhaps?
Kyle
___
rspec-users mailing list
rspec-use
rk, I prefer 'it has 4 entries' to 'it should have 4 entries'.
(Though, in the code, the use of 'should' to express the expectation,
does make sense, as the Rubinius page explains).
Thanks for bringing this up, I'd been thinking about it lately.
Kyle
___
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users
= Project.active_projects.all? { |p| p.active? }
all_active.should be_true
end
So the entirety really only hinges on active? and archived? working
properly. And if active? is just !archived?, there's only one real spot
from which errors will start cascading.
HTH,
Kyle
didn't even think of using a uniq on the has_many. I was using a
> validates_uniquness_of :scope => 'book_id'
>
> I will definitley look into this one.
>
> Thankyou
> Daniel
However you decide to go about solving it, th
gt;
> Scott Taylor
You can put the descriptions inside of modules. AFAICT, this has no
effect on how anything functions, it just lets you drop the namespacing
ugliness from your code:
module SomeProject
class SomeClass
end
end
module SomeProject
describe SomeClass, "something or o
er than a line, and 'specify do' reads poorly -- which may be what
you have against it, too. So far, I've just tried to avoid that...
Of course, I say that now, and then someone will have a great suggestion
for a word that makes tons more sense.
Kyle
__
42 matches
Mail list logo