Rick, could you elaborate on this? I'm curious, how would you use a shared
example group here, given his sample code?
My first thought was to use ancestors to get the parent class, and re-define
the 'a' method there to do something simple and observable, and then test
that. Is that evil?
On Thu,
Ok, so here's the scenario. I have a top-level module, with a method called
load_file. It should take a file name, get the YAML module (Syck) to parse
it, and then send the result to a class, which should convert that result
into a series of objects.
I'm not sure what specs, if any, I should write
On Sat, Oct 30, 2010 at 12:46 PM, David Chelimsky wrote:
> On Oct 30, 2010, at 11:40 AM, Andrew Wagner wrote:
>
> > Ok, so here's the scenario. I have a top-level module, with a method
> called load_file. It should take a file name, get the YAML module (Syck) to
> pars
Yeah, that's about what I figured, thanks. This is what I came up with:
require 'spec_helper.rb'
require 'yaml'
describe "BTree" do
describe ".load_file" do
context "when the file exists" do
before(:all) { File.open("test_file.yaml", 'w') {|f| } }
after(:all) { File.delete "test
On Sat, Oct 30, 2010 at 9:54 PM, Andrew Premdas wrote:
> On 30 October 2010 14:40, Andrew Wagner wrote:
>
>> Ok, so here's the scenario. I have a top-level module, with a method
>> called load_file. It should take a file name, get the YAML module (Syck) to
>> parse
Suppose we have this class:
class MarbleMachine
def insert color
# process marble of color 'color'
end
def press button
# process a push of the given button
end
def output
# compute a result
end
end
Let's presume here that the machine takes any number of marbles in any o
a few different, but related, contexts like the ones
I've put in shared examples. Ideally, I'd like to figure out how to make
these contexts composable in some way, because the actions they're comprised
of are composable.
On Tue, Nov 16, 2010 at 1:07 PM, Andrew Wagner wrote:
> Sup
I went back and forth on whether to send this to this list or the ruby-talk
list, so feel free to tell me to take a hike...
I'm working on a personal project where I'm trying to keep a really high bar
on quality. One of the ways I'm doing that is to stick very close to the
BDD/TDD cycle as suggest
Is there any way, within a test (e.g., in an after block), to see whether
the test is currently passing, failing, or pending? Even a hack-ish kind of
way? I'm just curious.
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailma
To diagnose this, I would start to try to isolate the problem as much as
possible. Get it all the way down to one file, outside of rails, with one
test that exemplifies the behavior, if need be. And if you get to that point
and still see the strangeness...send us a pastebin of it :)
On Wed, Feb 16
What does your actual spec look like?
On Wed, May 18, 2011 at 10:04 AM, DKR wrote:
> I am working on Rspec2.5.0 with rails 3.0.6 . And I was successfully
> able to complete model testing. But when I come to controller part I
> wanted to see whether some variable getting generated & I have given
11 matches
Mail list logo