On Thu, Feb 26, 2009 at 12:08 PM, Nick Hoffman wrote:
> On 25/02/2009, at 9:49 PM, Suprie Leonhart wrote:
>
>> On Thu, Feb 26, 2009 at 4:39 AM, Nick Hoffman
>> wrote:
>>
>> Hi Suprie. AFAIK, RSpec populates the "request" object in your specs after
>> a controller action is called. Since your "sh
Any good way to find all orphaned steps? That is, any steps that exist
that do not match any features?
You can use RCov.
Aslak
Many thanks,
Tim
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-u
On 25/02/2009, at 9:49 PM, Suprie Leonhart wrote:
On Thu, Feb 26, 2009 at 4:39 AM, Nick Hoffman
wrote:
Hi Suprie. AFAIK, RSpec populates the "request" object in your specs
after a controller action is called. Since your "should know if it's
from blackberry" example doesn't call a controll
On Thu, Feb 26, 2009 at 4:39 AM, Nick Hoffman wrote:
>
> Hi Suprie. AFAIK, RSpec populates the "request" object in your specs after
> a controller action is called. Since your "should know if it's from
> blackberry" example doesn't call a controller action, the "request" object
> is nil.
> -Nick
On Wed, Feb 25, 2009 at 10:45 PM, David Chelimsky wrote:
> On Wed, Feb 25, 2009 at 3:51 AM, Suprie Leonhart
> wrote:
> >
> >
> > On Wed, Feb 25, 2009 at 4:19 PM, David Chelimsky
> > wrote:
> >>
> >> On Wed, Feb 25, 2009 at 1:57 AM, Suprie Leonhart
> >> wrote:
> >> > hi
> >> >
> >> > i'm testing
On Wed, Feb 25, 2009 at 7:48 PM, George Anderson
wrote:
> Thanks, David. That was a good call.
>
> I had these installed:
>
> dchelimsky-rspec (1.1.11.1)
> dchelimsky-rspec-rails (1.1.11.1)
Glad you got it resolved.
Cheers,
David
>
> They were getting picked up instead of the new 1.1.99.9 gems
Thanks, David. That was a good call.
I had these installed:
dchelimsky-rspec (1.1.11.1)
dchelimsky-rspec-rails (1.1.11.1)
They were getting picked up instead of the new 1.1.99.9 gems.
Once I uninstalled them, everything worked.
Thanks again. I appreciate the support.
/g
--
George Anderson
On Wed, Feb 25, 2009 at 2:40 PM, Evgeny Bogdanov
wrote:
> The function to specify and specification for it are below.
>
> Comment.stub!(:find).and_return(@comment)
> does what I need.
> However, it strongly depends on the implementation of find_comment
> function,
> and if I change it to, let's sa
Unfortunately, it doesn't solve the problem. Thanks anyway
Yi
On Wed, Feb 25, 2009 at 5:18 PM, Mark Wilden wrote:
> On Wed, Feb 25, 2009 at 2:50 PM, Yi Wen wrote:
> > The following statement gave me "wrong number of arguments (2 for 1)" and
> it
> > is the only error. no stack trace.
> >
I haven't looked into it too much. But I believe it is because I implemented
method_missing and respond_to?, which probably conflicts with RSpec's
imlementations. I have been wanting to re-implement my functionality in
another way other than method_missing for a long time. It seems now is the
perfe
Any good way to find all orphaned steps? That is, any steps that exist
that do not match any features?
Many thanks,
Tim
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
On Wed, Feb 25, 2009 at 2:50 PM, Yi Wen wrote:
> The following statement gave me "wrong number of arguments (2 for 1)" and it
> is the only error. no stack trace.
> presenter.stub!(:account).and_return account
> any idea? Thanks
> Yi
>
> ___
> rs
On Wed, Feb 25, 2009 at 4:37 PM, George Anderson
wrote:
>> Is something in your app is requiring version 1.1.11.1 in specific?
>
> Negative.
>
> That was my thought too, but no such requirement exists.
Gotta be coming from somewhere. May not be in your app, but something
somewhere on your machine
Ben Mabey wrote:
And could we make it ... cucumber colored? like cucumber.css probably
does? (-:
cucumber.css? Is that what cucumber uses for it's HTML formatter? I'm
sure you could. I would recommend starting with the github css I have
in the project and use Firebug/Webdeveloper to chang
On Wed, Feb 25, 2009 at 4:50 PM, Yi Wen wrote:
> The following statement gave me "wrong number of arguments (2 for 1)" and it
> is the only error. no stack trace.
try running with --backtrace
> presenter.stub!(:account).and_return account
> any idea? Thanks
> Yi
>
> _
The following statement gave me "wrong number of arguments (2 for 1)" and it
is the only error. no stack trace.
presenter.stub!(:account).and_return account
any idea? Thanks
Yi
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyfo
The function to specify and specification for it are below.
Comment.stub!(:find).and_return(@comment)
does what I need.
However, it strongly depends on the implementation of find_comment
function,
and if I change it to, let's say, this one:
def find_comment
@space = Space.find(1)
> Is something in your app is requiring version 1.1.11.1 in specific?
Negative.
That was my thought too, but no such requirement exists.
/g
--
George Anderson
BenevolentCode LLC
O: (410) 461-7553
C: (410) 218-5185
geo...@benevolentcode.com
On Wed, Feb 25, 2009 at 5:29 PM, David Chelimsky w
On Wed, Feb 25, 2009 at 3:53 PM, George Anderson
wrote:
> I pulled both repos and tried 'rake gem' but got 'permission denied'
> 'sudo rake gem' worked:
>
> ~/work/rspec (master) $ rake gem
> (in /Users/george/work/rspec)
> /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/gempackagetask.rb:13
I pulled both repos and tried 'rake gem' but got 'permission denied'
'sudo rake gem' worked:
~/work/rspec (master) $ rake gem
(in /Users/george/work/rspec)
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/gempackagetask.rb:13:Warning:
Gem::manage_gems is deprecated and will be removed on or a
Thanks a lot!
Got an idea!
On Feb 25, 11:35 am, Pat Maddox wrote:
> On Wed, Feb 25, 2009 at 2:13 AM, Evgeny Bogdanov
>
>
>
> wrote:
> > I am wondering what is the best way to mock such expression:
> > "comment.initiator.group.name"
>
> > What I do now is:
> > ===
> > comm
On 25/02/2009, at 4:51 AM, Suprie Leonhart wrote:
On Wed, Feb 25, 2009 at 4:19 PM, David Chelimsky
wrote:
On Wed, Feb 25, 2009 at 1:57 AM, Suprie Leonhart
wrote:
> hi
>
> i'm testing some lib i've made for detecting mobile user agent, I
confused
> how to test the lib i've made.
> the test
On Wed, Feb 25, 2009 at 2:35 PM, George Anderson
wrote:
> >From David: > We're up to 1.1.99.9 now - have you tried that?
>
> Sorry, yes, I meant 1.1.99.1.
>
> ~/work/rspec (master) $ gem list rspec
>
> *** LOCAL GEMS ***
>
> rspec (1.1.99.9)
> rspec-rails (1.1.99.9)
>
>
> This is what I did:
>
> c
Phlip wrote:
Ben Mabey wrote:
http://github.com/bmabey/cucumber-pygments-lexer/tree/master
You can get something like:
http://www.benmabey.com/cucumber_on_github.html
Nice! Will use!
And could we make it ... cucumber colored? like cucumber.css probably
does? (-:
cucumber.css? Is that w
>From David: > We're up to 1.1.99.9 now - have you tried that?
Sorry, yes, I meant 1.1.99.1.
~/work/rspec (master) $ gem list rspec
*** LOCAL GEMS ***
rspec (1.1.99.9)
rspec-rails (1.1.99.9)
This is what I did:
cloned: git://github.com/dchelimsky/rspec.git
rake gem
rake install_gem
cloned:
Ben Mabey wrote:
http://github.com/bmabey/cucumber-pygments-lexer/tree/master
You can get something like:
http://www.benmabey.com/cucumber_on_github.html
Nice! Will use!
And could we make it ... cucumber colored? like cucumber.css probably does? (-:
On Wed, Feb 25, 2009 at 1:24 PM, George Anderson
wrote:
> Hi,
>
> I'm failing miserably to get RSpec running with edge rails (2.3 RC1).
> I've tried building/installing the 1.1.99.1 gems from David's git
> repos (http://github.com/dchelimsky/rspec-rails and
> http://github.com/dchelimsky/rspec), b
I have edge rails along with RSpec 1.1.99. works fine. What errors do you
get?
On Wed, Feb 25, 2009 at 1:24 PM, George Anderson
wrote:
> Hi,
>
> I'm failing miserably to get RSpec running with edge rails (2.3 RC1).
> I've tried building/installing the 1.1.99.1 gems from David's git
> repos (http:
Phlip wrote:
Cucumberists (and RSpec Classic users ;):
How can we convert a Cucumber feature file into HTML with syntax
highlighting?
Not the test-runner output; that's preprocessed so it does not match
the input file...
Tx!
Using this:
http://github.com/bmabey/cucumber-pygments-lexer/t
Hi,
I'm failing miserably to get RSpec running with edge rails (2.3 RC1).
I've tried building/installing the 1.1.99.1 gems from David's git
repos (http://github.com/dchelimsky/rspec-rails and
http://github.com/dchelimsky/rspec), but no luck.
I realize "releases with a 4th partial [are] interim (u
Andrew Premdas wrote:
> James,
>
> Thanks for taking the time and providing more fodder to chew on.
>
> There are a couple of things I'd like to point out
I will take a little time to digest this and perhaps to comment but, in
the meantime, thank you for your thoughts on this matter. There is
On Wed, Feb 25, 2009 at 10:39 AM, Jeff Talbot wrote:
>
>
> On Wed, Feb 25, 2009 at 10:23 AM, David Chelimsky
> wrote:
>>
>> On Wed, Feb 25, 2009 at 10:10 AM, Jeff Talbot
>> wrote:
>> > Hello,
>> >
>> > Something I do often is use stub methods in before blocks and mock
>> > expectations in a spec
On Wed, Feb 25, 2009 at 10:23 AM, David Chelimsky wrote:
> On Wed, Feb 25, 2009 at 10:10 AM, Jeff Talbot
> wrote:
> > Hello,
> >
> > Something I do often is use stub methods in before blocks and mock
> > expectations in a specific examples (much like described here:
> > http://blog.davidchelimsky
James,
Thanks for taking the time and providing more fodder to chew on.
There are a couple of things I'd like to point out
Modelling the world is a futile and pointless task. Its to big and
complicated. Model YOUR world instead, choose the external boundaries
carefully and make your world as sim
Cucumberists (and RSpec Classic users ;):
How can we convert a Cucumber feature file into HTML with syntax highlighting?
Not the test-runner output; that's preprocessed so it does not match the input
file...
Tx!
--
Phlip
___
rspec-users mailing
On Wed, Feb 25, 2009 at 10:10 AM, Jeff Talbot wrote:
> Hello,
>
> Something I do often is use stub methods in before blocks and mock
> expectations in a specific examples (much like described here:
> http://blog.davidchelimsky.net/2006/11/9/tutorial-rspec-stubs-and-mocks).
>
> I was just surprised
Hello,
Something I do often is use stub methods in before blocks and mock
expectations in a specific examples (much like described here:
http://blog.davidchelimsky.net/2006/11/9/tutorial-rspec-stubs-and-mocks).
I was just surprised with an instance of doing this and I thought I'd check
with the g
On Wed, Feb 25, 2009 at 3:51 AM, Suprie Leonhart
wrote:
>
>
> On Wed, Feb 25, 2009 at 4:19 PM, David Chelimsky
> wrote:
>>
>> On Wed, Feb 25, 2009 at 1:57 AM, Suprie Leonhart
>> wrote:
>> > hi
>> >
>> > i'm testing some lib i've made for detecting mobile user agent, I
>> > confused
>> > how to t
Hi Josh et al
On 25/02/2009, Josh Knowles wrote:
> On Wed, Feb 25, 2009 at 5:52 AM, aidy lewis wrote:
> > Hi,
> >
> > When we create step defintions. For example:
> >
> > When /^that data is loaded$/ do
> >
> > end
>
>
>
> Are you familiar with the "pending" method?
>
> i.e.
>
>
> When /
On Wed, Feb 25, 2009 at 8:20 AM, vo.x wrote:
> Aha, it seems that there is difference between behavior of Rails 2.1
> and 2.3. In Rails 2.1 stubbing works like a charm but it fails with
> Rails 2.3 :/
That's a very general statement. Can you be more specific? What
version of rspec are you using?
On Wed, Feb 25, 2009 at 5:52 AM, aidy lewis wrote:
> Hi,
>
> When we create step defintions. For example:
>
> When /^that data is loaded$/ do
>
> end
Are you familiar with the "pending" method?
i.e.
When /^that data is loaded$/
pending
end
___
rspe
On 23 Ún, 17:30, Stephen Eley wrote:
> On Fri, Feb 20, 2009 at 5:45 PM, vo.x wrote:
> > Hello everybody!
>
> > Im wondering what is the best way of specing action with send file
> > such as:
>
> I'd probably do it on two fronts. On the unit test level, you can
> stub it in your setup so that i
aidy lewis wrote:
Hi,
When we create step defintions. For example:
When /^that data is loaded$/ do
end
The above is seen in the Cucucmber run as implemented.
Is it possible to put something within this method to enforce a skip flag?
Do you mean something like the 'pending' funct
On Wed, Feb 25, 2009 at 11:52 AM, aidy lewis wrote:
> Hi,
>
> When we create step defintions. For example:
>
> When /^that data is loaded$/ do
>
> end
>
> The above is seen in the Cucucmber run as implemented.
>
> Is it possible to put something within this method to enforce a skip flag?
>
I'm no
Hi,
When we create step defintions. For example:
When /^that data is loaded$/ do
end
The above is seen in the Cucucmber run as implemented.
Is it possible to put something within this method to enforce a skip flag?
Aidy
___
rspec-users maili
Can you show your spec? I'm not sure why you're using assigns in the
controller spec. David explained that it doesn't work like that.
Your spec should look something like
it "should destroy the record" do
mock_comment = stub_model Comment
Comment.stub!(:find).and_return mock_comment
mock_c
On Wed, Feb 25, 2009 at 2:13 AM, Evgeny Bogdanov
wrote:
> I am wondering what is the best way to mock such expression:
> "comment.initiator.group.name"
>
> What I do now is:
> ===
> comment = mock_model(Comment)
> initiator = mock_model(User)
> group = mock_model(Group, :na
I am wondering what is the best way to mock such expression:
"comment.initiator.group.name"
What I do now is:
===
comment = mock_model(Comment)
initiator = mock_model(User)
group = mock_model(Group, :name => "Admin")
initiator.stub!(:group).and_return(group)
comment.stub!(
Thank you, David!
One small follow-up question.
Is there is a way to mock an object "@comment" in the controller_spec
for the function?
I didn't manage to do it.
def destroy
@destroy_id = @comment.id #to be used in rendering partial
@comment.destroy
end
Looks like assigns[:comment] = mock
On Wed, Feb 25, 2009 at 4:19 PM, David Chelimsky wrote:
> On Wed, Feb 25, 2009 at 1:57 AM, Suprie Leonhart
> wrote:
> > hi
> >
> > i'm testing some lib i've made for detecting mobile user agent, I
> confused
> > how to test the lib i've made.
> > the test code is
> >
> > [code]
> >
> > describe
On Wed, Feb 25, 2009 at 1:57 AM, Suprie Leonhart
wrote:
> hi
>
> i'm testing some lib i've made for detecting mobile user agent, I confused
> how to test the lib i've made.
> the test code is
>
> [code]
>
> describe "Check if mobile browser" do
> it "should know if it's from blackberry" do
>
hi
i'm testing some lib i've made for detecting mobile user agent, I confused
how to test the lib i've made.
the test code is
[code]
describe "Check if mobile browser" do
it "should know if it's from blackberry" do
blackberry_ua = "BlackBerry8330/4.3.0 Profile/MIDP-2.0
Configuration/
52 matches
Mail list logo