Displaying 20 results from an estimated 7000 matches similar to: "Including my plugin specs into rake spec"
2008 Mar 04
2
textmate bundle
Hi,
I''m just getting e set up on my machine, and I was wondering if someone
could point me to the current rspec bundle for textmate? I googled and found
a million of them, I think.
Thanks.
-Corey
--
http://www.coreyhaines.com
The Internet''s Premiere source of information about Corey Haines
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2008 Mar 05
2
Testing that a model helper method is called
So, I have a plugin that adds a method to ActiveRecord::Base, let''s call the
method is_encrypted.
class MyModel < ActiveRecord::Base
is_encrypted
end
So, my question is, how do I write a spec to show that is_encrypted is
called here? I would rather not write specs that say that the behavior is
there, since I have tested the behavior already in my plugin.
Thanks.
-Corey
--
2008 Jan 15
4
Okay, I''m finally asking for help
Hi, all!
I would love if someone could help me figure this out. I can''t seem to see
why the following fails:
Here''s the spec:
it "should redirect back to the index page" do
Coupon.should_receive
(:new).with({"name"=>@expectedName,"amount"=>@expectedAmount}).and_return(@coupon)
@coupon.should_receive(:save)
response.should
2008 Jan 20
2
Which taggable library do people use?
I''d like to add taggability to a model in the site I''m working on, and I
wanted to get an idea of what people are using. I keep seeing that
acts_as_taggable is deprecated, so I tried the acts_as_taggable_on_steroids.
I also tried be_taggable.
In any case, I figured I''d see what people use.
thanks.
-corey
--
http://www.coreyhaines.com
The Internet''s Premiere
2007 Dec 27
5
ExampleGroup and SharedExampleGroup relationship(?)
I''m working on a series going over the source code for rspec, and I ran into
something interesting with ExampleGroup and SharedExampleGroup. I was
wondering if anyone could shed light on it.
[NOTE: I''m working through the code for my own edification in learning Ruby.
Ruby has some features that I think are incredibly cool, so I''m using a
concrete implementation (RSpec)
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
2008 Mar 11
6
Story testing views in isolation
Hi,
I''ve been investigating plain text stories, and I had a quick question. How
would I go about creating story tests for views in isolation, instead of the
full stack? I had hoped to be able to do a straight render ''/'', but it says
it can''t find the method.
The reason that I want to do this is that I want to give our
designer/business people a way to write
2008 Jan 23
18
Not seeing the failure
All,
I''m missing something simple, I think. I am writing a spec to say that my
CouponController should create a new coupon from the form parameters, then
set the current user. Here''s the spec:
describe CouponController, "When posting to save_coupon" do
before(:each) do
@expectedName = "pepper''s"
@expectedAmount = 5
coupon =
2008 Jan 27
20
OT local version control?
Hi, all,
This isn''t about rspec, but this list has people whose opinions I respect.
So, I''m looking for a new version control system for my local development. I
was going to install subversion, but I''ve heard rumors of people using some
newer ones. Thoughts? I''d like to be able to run it either locally or on a
home server. If I run it off a home server, then
2008 Jan 31
6
loading fixtures?
How do you load fixtures from specs as you would test?
eg. rake db:fixtures:load RAILS_ENV=development
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20080131/38c3b0ab/attachment.html
2008 Mar 19
3
ApplicationHelper
When working with views, I use instance methods of ApplicationHelper:
# app/helpers/application_helper.rb:
module ApplicationHelper
def distribute(total, min, cutof, list)
[1,2,3]
end
end
# app/views/planner/_mta_colors.rhtml:
<td>
<%
...
dist = distribute(total_v_px, 4, 0, colors.collect{|color| color[1]})
...
%>
So to test the distribute method in ApplicationHelper, I have
2008 Jan 29
3
I thought the RSPec community might be interested
in my latest blog posting
:http://talklikeaduck.denhaven2.com/articles/2008/01/29/why-i-dont-mind-using-rspec-in-fact-ive-come-to-love-it
--
Rick DeNatale
My blog on Ruby
http://talklikeaduck.denhaven2.com/
2008 Jan 13
1
View spec''ing style
I''ve been getting my head around view spec''ing lately for a fairly
complex project that makes heavy use of partials in views and I have hit
up against a style puzzle.
I see two strategies for spec''ing views:
First:
Develop detailed specs for each partial and then make sure that the
final view expects that the appropriate partials are included and used.
Pros:
2008 Mar 14
2
Multiple should_receive(:render).with
I''m trying to specify that a particular view must render two different partials.
My spec looks like:
describe AClass do
it do
template.should_receive(:render).with(:partial => ''foo'', :locals => { ... })
...
end
describe ''some conditional case'' do
it do
template.should_receive(:render).with(:partial =>
2007 May 01
0
release 0.9 ''modifies'' specs at each rake invocation?
Hello,
I am getting some odd behaviour. If I execute rake spec, and then
try to modify a spec file that I have open in vi, and then go to save
this file, vi warns me that the file has been modified outside of vi.
However, if I execute only this file via script/spec, this
modification does not take place. I file doesn''t appear to be getting
substantively modified, so I''m
2007 Oct 18
0
rake spec:models failing
Hi there,
I''m having trouble with `rake spec:models`. It''s failing on:
- 1 old rspec/rails project
- all new rspec/rails projects
But, it *is* working fine on my other (older) rspec/rails projects. All
projects are on rspec & rails 1.0.8, Rails 1.2.3, os X ppc
Here''s a fresh rspec/rails project with failing rake task
$ rails test_app -d postgresql
$ cd
2008 Mar 04
3
rspec vs. test::more
Hey all,
you HAVE to read this blog post:
http://blog.jrock.us/articles/RSpec%20vs.%20Test::More.pod#comments
My favorite parts are:
1)
... some rspec code ...
> For the sake of comparison lets translate this directly into perl:
... some perl code ...
2)
>First, notice that the rspec-version isn''t actually ruby code. It''s
not any real language.
For the sake of
2007 Mar 15
5
rake spec:views no transaction error
Hello,
I have recently upgraded to the 0.8.2 release of rSpec, and I am receiving
the following message with each view spec execution:
WARNING: there is no transaction in progress
I have upgraded the rspec_on_rails plugin as well, and both the model and
controller tests are working flawlessly. Is there some simple step I
missed? thanks for the input.
-Chris
-------------- next part
2008 Mar 08
7
ridding away with do_request
I''m heading out of town, but had a quick thought I wanted to share.
Rather then using ambiguous named request helpers in controller specs
like "do_request", I''ve been using more readable helpers like
"post_create".
For example...
describe ProjectController do
def post_create
post :create, ...
end
before do
end
it "creates a new
2006 Dec 07
3
Newbie Error Running specs
I''m new to rspec. I just installed these:
rspec (0.7.4) RSpec-0.7.4 (r1201) (rspec gem)
rspec_on_rails .3 plugin (on vendor/plugin)
I''ve set up a simple spec - spec/library/test_spec.rb:
require File.dirname(__FILE__) + ''/../spec_helper''
context "test context" do
setup do
#nothing
end
specify "nothing to specify" do