This is actually a pretty tough problem for a newbie, and sent me
reeling away from the story runner with my gumption in tatters the
first time I tried it.
You could probably figure out how to post an authentication token in
the HTTP headers if you use the basic underlying rails integration
On Tue, Oct 7, 2008 at 8:36 AM, Mark Thomson <[EMAIL PROTECTED]> wrote:
> Hmm, thanks. Still not sure if I'm diagnosing my problem correctly. Just to
> be clear, I don't have any user authentication going on, just a regular
> Rails button_to call. I tried installing webrat and put "visits '/' " in
Hi
Can I still rely on this RSpec behaviour?
I've got a spec for a TCP socket client:
it "should do things in a sane order" do
@socket.should_receive(:write) do
@socket.should_receive(:read) do
@socket.should_receive(:close)
end
end
Hmm, thanks. Still not sure if I'm diagnosing my problem correctly. Just
to be clear, I don't have any user authentication going on, just a
regular Rails button_to call. I tried installing webrat and put "visits
'/' " in my "given" step and "clicks_button" in my "when" step. However
I get an er
Hi
I've got code I want to intercept all errors (to report them) but re-
raise them immediately. Currently the raise_error matcher doesn't
support matching against instances of exception classes, so I've done
this to prove that the actual exception was re-raised:
describe "when th
Another tip is to use script/console and walk the app manually.
In script/console you get an app object which is the context that your
story steps / integration tests run in.
e.g.
$script/console
Loading rails blah blah blah
>> app.post "/login", :username => "matt", :password => "secret"
>>
On Tue, Oct 7, 2008 at 7:59 AM, Ashley Moran
<[EMAIL PROTECTED]> wrote:
> Hi
>
> Can I still rely on this RSpec behaviour?
>
> I've got a spec for a TCP socket client:
>
> it "should do things in a sane order" do
>@socket.should_receive(:write) do
> @socket.should_receive(:rea
On Oct 7, 2008, at 6:02 AM, Pau Cor wrote:
Hi,
I have started writing my own generators, and I was wondering if
anyone
had any suggestions for testing them.
I know I could just run the generator in a dummy application; write my
tests; and then copy the tests back into the generator. But th
On Tue, Oct 7, 2008 at 8:57 AM, Ashley Moran
<[EMAIL PROTECTED]> wrote:
> Hi
>
> I've got code I want to intercept all errors (to report them) but re-raise
> them immediately. Currently the raise_error matcher doesn't support
> matching against instances of exception classes, so I've done this to
On 7 Oct 2008, at 15:15, David Chelimsky wrote:
As far as I know this form of expectation ordering was never
supported. If you've seen documentation that suggests it should be,
please point me to it so I can resolve the discrepancy.
Aslak told me himself... on this list :o)
Ordering in rsp
On 7 Oct 2008, at 15:33, David Chelimsky wrote:
Regardless, if you really care about the specific instance you can
do this:
lambda {
@connection.receive_data("UPDATE\n")
}.should raise_error {|error| error.should equal(@error)}
If what you care about is the message, you can expect specific
On Tue, Oct 7, 2008 at 9:40 AM, Ashley Moran
<[EMAIL PROTECTED]> wrote:
>
> On 7 Oct 2008, at 15:15, David Chelimsky wrote:
>
>> As far as I know this form of expectation ordering was never
>> supported. If you've seen documentation that suggests it should be,
>> please point me to it so I can reso
Hi,
I have started writing my own generators, and I was wondering if anyone
had any suggestions for testing them.
I know I could just run the generator in a dummy application; write my
tests; and then copy the tests back into the generator. But that seems
backwards.
Any ideas?
Thanks
--
Posted
Hey thanks Zach. That was a good suggestion. What the log file showed me
was that I had a nil object being accessed in my "new" action - and the
reason is that it's an object that in my development code is read from a
table of global variables in my db. I create that table, including the
values
On 2008-10-07, at 00:25, Greg Hauptmann wrote:
'Recurring.add projections (perform credit card payment) should
calculate amount based on offset provided' FAILED
expected no Exception, got #exception>
==> Actually does show exception name, but doesn't give a back
trace? Is there a way to see t
On 7 Oct 2008, at 15:55, David Chelimsky wrote:
Is the block no longer being executed? If so, then we have a problem
:) Please report this at http://rspec.lighthouseapp.com.
Bizarrely, my little test...
require 'spec'
describe "Blocks" do
it "should be called" do
b = mock(Obje
Hi,
Is there anyway I can cycle through all the features in a folder and
pipe to html
through the command line?
For this:
C:\SvnProjects\my_application\features> cucumber *.feature --format html
> my_application.htm
I am getting a wrong number of arguments (3 for 1).
Or how could run all featu
On Tue, Oct 7, 2008 at 11:39 AM, aidy lewis <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Is there anyway I can cycle through all the features in a folder and
> pipe to html
> through the command line?
>
> For this:
> C:\SvnProjects\my_application\features> cucumber *.feature --format html
> > my_applicati
On Tue, Oct 7, 2008 at 6:47 PM, David Chelimsky <[EMAIL PROTECTED]> wrote:
> On Tue, Oct 7, 2008 at 11:39 AM, aidy lewis <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> Is there anyway I can cycle through all the features in a folder and
>> pipe to html
>> through the command line?
>>
>> For this:
>> C:\Sv
Hi David,
> cucumber folder_name --format html > report.html
Thanks for your response.
That doesn't seem to report for me (maybe it is because one of my
tests fails - throws an exception and then writes to the console
before it outputs to the html file).
Cheers
Aidy
_
Guys.
On 07/10/2008, aidy lewis <[EMAIL PROTECTED]> wrote:
> Thanks for your response.
>
> That doesn't seem to report for me (maybe it is because one of my
> tests fails - throws an exception and then writes to the console
> before it outputs to the html file).
>
Sorry for being a balloon.
H
On Tue, Oct 7, 2008 at 6:39 PM, aidy lewis <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Is there anyway I can cycle through all the features in a folder and
> pipe to html
> through the command line?
>
> For this:
> C:\SvnProjects\my_application\features> cucumber *.feature --format html
> > my_applicatio
On Tue, Oct 7, 2008 at 7:14 PM, aidy lewis <[EMAIL PROTECTED]> wrote:
> Guys.
> On 07/10/2008, aidy lewis <[EMAIL PROTECTED]> wrote:
>
>> Thanks for your response.
>>
>> That doesn't seem to report for me (maybe it is because one of my
>> tests fails - throws an exception and then writes to the c
You may want to look into using seed data. I currently use seed_fu by mbleigh:
http://github.com/mbleigh/seed-fu/tree/master
Here's the snippet I use to load them:
ActiveRecord::Base.establish_connection(ActiveRecord::Base.configurations['test'])
ActiveRecord::Schema.verbose = false
lo
Nice. Thanks. I had wondered if there was a way to separate the data
initialization from the step definitions. Looks like that's what this does.
Zach Dennis wrote:
You may want to look into using seed data. I currently use seed_fu by mbleigh:
http://github.com/mbleigh/seed-fu/tree/master
H
In a 1.2.6 app (don't ask), I don't see the generators available to me
with the gems installed. However the documentation makes it look like
it should work:
Generator gems are also available:
1. gem search -r generator
2. gem install login_generator
3. ./script/generate login
I've confirmed
> I've confirmed that with a fresh rails (2.x) app it works fine. Is
> this supposed to work with 1.2.6? Are there any workarounds that
> people have? Is my app just fucked atm?
erm, I've also confirmed that with a fresh rails 1.2.6 app it DOESN'T
see the gem generators. I'm pretty suspicious
Pat Maddox wrote:
In a 1.2.6 app (don't ask), I don't see the generators available to me
with the gems installed. However the documentation makes it look like
it should work:
Generator gems are also available:
1. gem search -r generator
2. gem install login_generator
3. ./script/generate l
Scott Taylor wrote:
> Why don't you generate the specs when you generate the code?
That's what I thought I'd have to do. The reason I'm reluctant to do it
is that either I need to write the real code first (and not tests
first). Or I need to rerun my generator every time I write a new test
(or
Getting the failure message:
expected redirect to "/admin/account", got redirect to "/admin/account"
I'm on Rails 1.2.6 with edge rspec/rspec-rails. There's nothing funky
inside that I can tell, but this is my first day with the app. I
assume this has to do with the fact that it's old ass rails.
On Oct 7, 2008, at 7:04 PM, Pat Maddox wrote:
Getting the failure message:
expected redirect to "/admin/account", got redirect to "/admin/
account"
I'm on Rails 1.2.6 with edge rspec/rspec-rails. There's nothing funky
inside that I can tell, but this is my first day with the app. I
assume
On Tue, Oct 7, 2008 at 4:58 PM, Pat Maddox <[EMAIL PROTECTED]> wrote:
>> I've confirmed that with a fresh rails (2.x) app it works fine. Is
>> this supposed to work with 1.2.6? Are there any workarounds that
>> people have? Is my app just fucked atm?
>
> erm, I've also confirmed that with a fres
On Tue, Oct 7, 2008 at 5:24 PM, Pau Cor <[EMAIL PROTECTED]> wrote:
> Scott Taylor wrote:
>> Why don't you generate the specs when you generate the code?
>
> That's what I thought I'd have to do. The reason I'm reluctant to do it
> is that either I need to write the real code first (and not tests
>
On Tue, Oct 7, 2008 at 4:34 PM, David Chelimsky <[EMAIL PROTECTED]> wrote:
> On Tue, Oct 7, 2008 at 4:58 PM, Pat Maddox <[EMAIL PROTECTED]> wrote:
>>> I've confirmed that with a fresh rails (2.x) app it works fine. Is
>>> this supposed to work with 1.2.6? Are there any workarounds that
>>> people
34 matches
Mail list logo