Displaying 20 results from an estimated 80000 matches similar to: "Fixture Scenarios plugin"
2007 Oct 16
10
Scenarios Plugin Pre-Announcement
This is sort of a pre-announcement for a Rails plugin my friend Adam
Williams and I are working on. We''re in the process of extracting it
from a project we are working on so that it can be generally useful to
the Rails community. We are calling it "Scenarios". It is a drop in
replacement for Rails fixtures:
http://faithfulcode.rubyforge.org/svn/plugins/trunk/scenarios/README
2007 Aug 13
1
Problem of using fixture in Rspec
Dear Fellows:
I was using fixtures in the model tests using Rspec. I found that the
test data specified in the fixtures was stored in the test database once I
ran the spec and won''t be removed anyway. Is my observation correct?
There might be another problem regarding the fixtures. When I ran the
specs one by one, it was working. However, it failed when I tried to run all
the
2007 May 27
1
annotate_models plugin to annotate RSpec specs and fixture
I have found useful to have the table information associated to models
disp?ayed in the models and fixtures files of my rails applications.
If you want to add this information to the spec_fixtures and specs add
the following patch to your plugin.
Index: vendor/plugins/annotate_models/lib/annotate_models.rb
===================================================================
---
2007 Feb 28
2
Fixture name not available as class variable in spec
Hi there,
I can''t seem to access the fixture name as a class variable from my
specs. I have to set the variable in the spec setup.
... [fixtures]
my_fixture:
id: 1
... [rpsec]
@my_fixture.id.should == 1
... [error]
You have a nil object when you didn''t expect it!
The error occurred while evaluating nil.id
... [my setup]
RSpec-0.7.5.1 (r1395) - BDD for Ruby
Rails
2007 May 21
2
Rails'' fixtures suck! But what about something like this?
Sorry about the very long email, but this is a hairy topic that''s been
annoying me for some time and I decided to try to do something about.
Also, if you got this twice, I apologize too, but it didn''t seem to
have successfully gone out the first time.
Background:
----------
I''ve been dealing with Rails for about a year and a half now. I''ve
been using
2007 Sep 07
4
fixtures in before(:all)
I was planning on using a fixture within a description that didn''t modify
the fixture, so I put it in a before(:all) block:
describe "Customer", "xml" do
fixtures :customers
before(:all) do
one = customers(:one)
end
# ...
As a result, I got this message:
1)
NoMethodError in ''Customer xml before(:all)''
You have a nil object when you
2007 Sep 21
1
Do fixture_scenarios and RSpec peacibly coexist?
Railsters:
I just installed fixture_scenarios ...
http://fixture-scenarios.googlecode.com/svn/trunk/fixture_scenarios
...into a project with some RSpec specifications. They all went kablooey.
I didn''t even create a scenario; the system just started calling its version
of fixtures(). The normal tests pass and the RSpec ones unanimously emit:
TypeError in ''Context (verbose
2007 Sep 27
0
fixture_scenarios in trunk
Hi,
I saw a previous post from David answering someones question about
fixture_scenarios with rspec. Following that I upgraded my rspec and
rspec_on_rails to the trunk versions and then installed the fixture
scenario plugin.
Now whenever I run my (previously passing rspecs) I get the following
error for all tests...
...
148)
NoMethodError in ''Cart should show a
2007 Aug 08
1
Transactional fixtures not working as expected
Hi!
I am quite new to BDD and I just wrote my first tests. Suddenly I
received unexpected results because in a model test I load only
users-fixtures but when the views-fixtures in which I load the
posts-fixtures, are run before this model-test, the posts-fixtures are
loaded too. I test for example if there is one record in the posts-table
after creating one post. But when there are fixtures
2006 Mar 22
1
An easy one: Accessing fixture data in 1.0+
OK, we all know that Rails turned off instantiated fixtures by default
in 1.0. That''s not a problem. However, what I''m now wondering is how
to access the raw fixture data out of the YML file (as opposed to the
database.) Mainly, for comparing my database results with my expected
results in a DRY way.
The book says if you have the command "fixtures :foo", that
2011 Aug 10
1
How to stop Rspec loading my Cucumber fixtures
I have a bunch of fixtures designed to populate the database for my Cucumber
integration tests.
But at this stage I want my database to be empty when using Rspec.
So, I moved the fixtures from `/spec/fixtures` to
`features/support/fixtures`, and updated `features/support/env.rb` to read:
Fixtures.reset_cache
fixtures_folder = File.join(RAILS_ROOT, ''features'',
2012 Mar 22
1
Rspec not loading fixtures
I am taking over a code base and am trying to run the tests. I am
somewhat new to RSpec so this might be a trivial problem.
Basically I can tell that the fixtures are not getting loaded. All 100
tests fail with a similar error.
But I don''t know why. Below is the code, with my narrative with ***
before it... Can you see anything or give me a clue where to look. So
far I am coming up
2007 Sep 10
1
Using Rspec with ScenarioFixtures
I am currently trying to get Rspec to work with ScenarioFixtures.
http://code.google.com/p/fixture-scenarios/
http://errtheblog.com/post/7708
I did a quick search and didn''t find any mention that any one else had
gotten this to work yet. If i missed something, could you please drop me a
line.
Otherwise, expect a progress report when i get this working...
Bret
-------------- next part
2007 Sep 04
3
Model Specs: Fixtures vs Mocks + Stubs?
What is the general opinion about fixtures versus mocking and stubbing
in model specs? I heard from agile on IRC that they save the database
testing for integration testing, but I also see that the caboose
sample applicaiton uses fixtures. I also noticed that on the rspec
site, it says "Ironically (for the traditional TDD''er) these are the
only specs that we feel should actually
2007 Apr 17
3
using rake db:fixtures:load with rspec fixtures
Hi, I''m new to rspec. I have some fixtures in /spec/fixtures. If they
were in /test/fixtures they could be loaded with rake db:fixtures:load.
Is there any way other than a symlink to load my rspec fixtures into
the database with rake? Or, can I cause rspec to load the fixtures
from /test/fixtures?
Thanks,
Paul
2006 Feb 08
0
Fixture access question
Hi,
I want to add the basic model record create tests for my rails app
as in the "Agile Web Development with Rails" example:
i.e. (header stuff and boring repitition missed)
def test_create
assert_kind_of Requirement, requirements(:requirement_1)
assert_equal <at>requirements["requirement_1"]["name"],
requirements(:requirement_1).name
end
Now I''m
2007 May 18
3
Fixtures considered harmful?
I''m trying to get really serious about doing true BDD for a new Rails
project, and I note that at <http://rspec.rubyforge.org/documentation/
rails/index.html> it says:
"we really don?t recommend the use of rails fixtures"
On the same page it also says (about Model specs):
"these are the only specs that we feel should actually interact with
the database"
2008 Feb 07
4
rspec fixtures stay in the test db - is this right?
I have some fixtures set up to put a few records in some of my tables.
In some of my rspec describe blocks, i''m *not* calling the fixtures, and
expecting the tables to be empty. But they''re not - the fixture data is
in there.
Am i using fixtures wrongly? I thought that the db was wiped at the
start of every test and the fixtures were only added if asked for. Is
that not the
2006 Dec 11
1
FAILED: "test" should equal "test" - what?
I''m trying out rspec_on_rails with a very simple test:
...
specify "product name should be ''test''" do
Product.find( :all ).first.name.should_equal ''test''
end
...
with this fixture:
first:
id: 1
name: test
When I run it:
.F
1)
''Given a generated product_spec.rb with fixtures loaded product name should
be
2008 Feb 18
5
uh... fixtures?
RSpec-ers:
I''m aware this is quite the FAQ. I have probably asked it myself, but I just
can''t Google up anything but others asking it.
I grabbed the source to Beast, to use as a Rails project uninfluenced by me, or
RSpec. Then I installed the CURRENT version of RSpec and rspec_on_rails, and set
up a model spec on Post.
Here''s the spec_helper.rb lines: