Cucumber - stub! or mock?

On Sep 30, 2008, at 10:55 AM, Luke M. wrote:

We need to stub time in some of our scenarios, which exist to to
verify behavior over time. We’re looking into a before/after to
support mocking/stubbing for this scenario.

Thanks for everyone’s thoughts. I understand that mocks are generally
an anathema to story tests. We’ve decided to use them to solve this
particular problem, though, and rely on our own self-discipline to not
abuse their presence. Here’s what we’re going with for now in our
env.rb:

require ‘spec/mocks’
require File.expand_path(File.join(File.dirname(FILE), “…”, “…”,
“vendor”, “plugins”, “rspec”, “plugins”, “mock_frameworks”, “rspec”))
include Spec::Plugins::MockFramework

Before do
setup_mocks_for_rspec
end

After do
begin
verify_mocks_for_rspec
ensure
teardown_mocks_for_rspec
end
end

Luke

Luke M.
[email protected]

On Tue, Sep 30, 2008 at 5:20 PM, aslak hellesoy
[email protected]wrote:

That gets you whatever the latest is, which is good if you want to live
on
edge. I’m behind a firewall, and living on edge isn’t necessarily a
good
option. Would it be too much to ask if you could tag the repo when you
jump
to a new release, like David is doing with rspec?

Github lets you download a snapshot of the repo by tags, and I just
build
the gems from that, and toss them up into a behind-the-firewall gem
server,
and let everyone gem install from there. It’s a bit harder with
cucumber,
because I’m not sure where the “released, stable” point is …

On Wed, Oct 1, 2008 at 5:11 PM, Chris F. [email protected] wrote:

You can do that with git pull and git checkout. Would it help if
detailed instructions were posted to the wiki?

That gets you whatever the latest is, which is good if you want to live on
edge. I’m behind a firewall, and living on edge isn’t necessarily a good
option.

Have you tried this?

export http_proxy=http://yourproxy:yourport
git clone http://github.com/aslakhellesoy/cucumber

git checkout SHA-of-the-rev-you-want

Would it be too much to ask if you could tag the repo when you jump
to a new release, like David is doing with rspec?

Absolutely - I’ll tag it when there is a release. And push a gem to
RubyForge. But there hasn’t been one yet.

Github lets you download a snapshot of the repo by tags, and I just build
the gems from that, and toss them up into a behind-the-firewall gem server,
and let everyone gem install from there. It’s a bit harder with cucumber,
because I’m not sure where the “released, stable” point is …

It’s whenever I feel like it and have some spare time :slight_smile: Probably
within the next week or so.

Aslak

On Wed, Oct 1, 2008 at 11:20 AM, aslak hellesoy
[email protected]wrote:

number.
Have you tried this?

export http_proxy=http://yourproxy:yourport
git clone http://github.com/aslakhellesoy/cucumber

git checkout SHA-of-the-rev-you-want

That’d work if I had git on the windows machine that can actually access
the
internet. Unfortunately, I don’t, and I won’t. It’s pretty tightly
locked
down. “firewall” is a bad term, because it implies there’s an actual
path
to the internet. There isn’t, at least not from the place I do actual
work. Have to burn files and copy them. Virus paranoia and such.

… yes, it’s a pain in the ass.

Would it be too much to ask if you could tag the repo when you jump
to a new release, like David is doing with rspec?

Absolutely - I’ll tag it when there is a release. And push a gem to
RubyForge. But there hasn’t been one yet.

Ah. I’d been going on the assumption that the occasional gem version
bumps
were signifying real checkpoints. If not, then, I havn’t yet been
burned by
pulling down head once a week or so

On Wed, Oct 1, 2008 at 5:30 PM, Chris F. [email protected] wrote:

On Tue, Sep 30, 2008 at 9:02 PM, Evan David L.

git checkout SHA-of-the-rev-you-want

That’d work if I had git on the windows machine that can actually access the
internet. Unfortunately, I don’t, and I won’t. It’s pretty tightly locked
down. “firewall” is a bad term, because it implies there’s an actual path
to the internet. There isn’t, at least not from the place I do actual
work. Have to burn files and copy them. Virus paranoia and such.

… yes, it’s a pain in the ass.

I can feel your pain. I have worked for this kind of clients.
Insurance and government. They don’t seem to understand how big an
impediment this is. And that people who need to work around this (us)
will do it anyway to get work done. It’s just stupid.

pulling down head once a week or so
No, actually - it’s been me trying to convince the GitHub pixies to
build the gem. To no avail.

Aslak

On Oct 1, 2008, at 11:53 AM, aslak hellesoy wrote:

No, actually - it’s been me trying to convince the GitHub pixies to
build the gem. To no avail.

Not to belabor a point overly but hence my suggestion to put a gem on
RubyForge.

I’m dying for a stable version of Cucumber – even if it’s only
“stable” :wink:

Evan

On Oct 1, 2008, at 12:09 PM, Ashley M. wrote:

On 1 Oct 2008, at 16:53, aslak hellesoy wrote:

No, actually - it’s been me trying to convince the GitHub pixies to
build the gem. To no avail.

Have we witnessed the birth of Pixie Driven Development this week?
I feel like we need PixieSpec and Pixie Stories next :slight_smile:

No, I think it’s a matter of “GitHub Driven Deployment” – or non-
Deployment as the case would be. :-/

Evan

On 1 Oct 2008, at 16:53, aslak hellesoy wrote:

No, actually - it’s been me trying to convince the GitHub pixies to
build the gem. To no avail.

Have we witnessed the birth of Pixie Driven Development this week? I
feel like we need PixieSpec and Pixie Stories next :slight_smile:

Ashley


http://www.patchspace.co.uk/

On Wed, Oct 1, 2008 at 12:30 PM, Chris F. [email protected] wrote:

On Tue, Sep 30, 2008 at 9:02 PM, Evan David L.

git checkout SHA-of-the-rev-you-want

That’d work if I had git on the windows machine that can actually access the
internet. Unfortunately, I don’t, and I won’t. It’s pretty tightly locked
down. “firewall” is a bad term, because it implies there’s an actual path
to the internet. There isn’t, at least not from the place I do actual
work. Have to burn files and copy them. Virus paranoia and such.

… yes, it’s a pain in the ass.

I hear ya brother, same here, luckily not anymore.

you can do the following (at home):

gem search cucumber --remote --source http://gems.github.com

gem fetch cucumber --source http://gems.github.com

This will put the .gem file in the folder you performed the task for
you to easily copy to your locked down environment :smiley:

pulling down head once a week or so
Github gems are only updated when the cucumber.gemspec file is updated.


Luis L.
AREA 17

Human beings, who are almost unique in having the ability to learn from
the experience of others, are also remarkable for their apparent
disinclination to do so.
Douglas Adams

On Oct 1, 2008, at 2:50 PM, aslak hellesoy wrote:

Does anyone want Cucumber gems? No? Yes? Anyone? OK I HEARD YOU! :slight_smile:

http://rubyforge.org/frs/?group_id=797

Just chill till it rsyncs around. Install docs are updated:
GitHub: Let’s build from here · GitHub

Thank you!

On Wed, Oct 1, 2008 at 7:03 PM, Luis L. [email protected]
wrote:

detailed instructions were posted to the wiki?
git clone http://github.com/aslakhellesoy/cucumber

you to easily copy to your locked down environment :smiley:

were signifying real checkpoints. If not, then, I havn’t yet been burned by
pulling down head once a week or so

Github gems are only updated when the cucumber.gemspec file is updated.

Yes, but only in theory:
http://logicalawesome.lighthouseapp.com/projects/8570-github/tickets/945

Does anyone want Cucumber gems? No? Yes? Anyone? OK I HEARD YOU! :slight_smile:

http://rubyforge.org/frs/?group_id=797

Just chill till it rsyncs around. Install docs are updated:

Aslak