Displaying 20 results from an estimated 10000 matches similar to: "Spec''ing via features"
2009 Apr 22
15
Why RSpec?
I like Shoulda. Sometimes I like plain old Test::Unit. Cucumber
gives me a different thought process.
I''d just like to hear some thoughts on why RSpec? What does it buy me
that I can''t get with Shoulda? I just can''t seem to think in RSpec.
Where is there a good example of RSpec tests that will help me grasp
the right path?
Thanks!
--
Amos King
2008 Nov 19
6
RSpec, TestUnit, Cucumber and Autotest
OS=CentOS-5.2
Ruby=1.8.6
Rails=2.2.1_RC
Gems all up to date
I have been experimenting with autotest and I have a few questions.
1. given export AUTOFEATURES=TRUE if ./test exists (with tests) then
these tests are run and the features are not. Is this intended
behaviour?
2. given require ''autotest/redgreen'' in .autotest if /test tests are run
then all I get colourized is a
2005 Nov 16
19
Concerns over Rails' handling of tests
Sorry if this comes across as a bunch of disjointed thoughts...I''m just
trying to put my thoughts down and I''d like to know what other people''s
opinions on the subject are.
I''ve been working with Rails for 3 or 4 months now and I''m constantly trying
to look at ways of improving my testing techniques, especially when it comes
to TDD. I have a few
2007 Aug 24
26
testing behaviour or testing code?
hypothetical question for all you BDD experts:
I want to make sure that a :list action always returns widgets in
alphabetical order. There''s at least 2 ways of doing this:
it "should fetch items in alphabetical order" do
Widget.should_receive(:find).with(:order => "name ASC")
get :list
end
it "should fetch items in alphabetical order" do
[:red,
2008 Dec 06
4
Autospec does not work w/ cucumber features?
Hi!
And now for the second part of the subject of my previous mails :)
$ cat cucumber.yml
default: .
autotest: -v .
autotest-all: -v -f progress .
$ cucumber -i . -f progress
PP
Pending Scenarios:
1) enlightenment (meditation)
$ AUTOFEATURE=true autospec # bug! prompt returns immediately, ZenTest gem not a dependency? a warning that autotest was not found would be nice.
$ sudo gem
2009 Feb 03
3
Rcov - Specifying rake tasks
I am trying to get a customized rcov rake task working. What I have so
far looks like this:
desc "Rcov code coverage reports"
require ''rcov/rcovtask''
require ''spec/rake/spectask''
require ''cucumber/rake/task''
task :rcov => "rcov:all"
namespace :rcov do
Rcov::RcovTask.new(:all) do
task :rcov =>
2006 Sep 19
18
Open Source UML Tool for Ruby on Rails?
I am new to web development, Ruby on Rails, and UML as well. I was
wondering if there were any free tools available for UML design.
There is a list of free tools on wikipedia under UML tools, but I don''t
understand if I need a tool that supports the ruby language. If anyone
uses a free UML tool for designing Ruby on Rails apps, please let me
know what you use.
2009 Apr 19
1
Cucmber: Mysql::Error: query: not connected: ROLLBACK
Hi,
I ran in trouble with unexpected rollbacks using cucumber 0.3.0.
My feature-file looks like
Scenario: Create Valid Item
Given I start
and the step is
Given /^I start$/ do
get "/items"
end
In my log/test.log I get
SQL (0.2ms) SET NAMES ''utf8''
SQL (0.2ms) SET SQL_AUTO_IS_NULL=0
SQL (0.1ms) BEGIN
Processing ItemsController#index
2009 May 04
6
cucumber - when to stub/mock
I''m just curious about this, since my solution involved stubbing a
call to GeoIp.
Is there a good rule of thumb for when you make exceptions to the ''no
stubbing'' philosophy of Cucumber?
My step was: "Given I am accessing the site from Japan," but I can
think of other situations - mostly when interacting with web services,
that I''d probably
2012 May 22
6
Beginning with BDD: Rspec or Cucumber? What is better documented?
Hey everybody
I''m sorry, I know that this question seems to arise every few moments,
but I
think in my case it''s a bit special (but doesn''t everybody?).
Well, I''m working with RoR on a private level since v1.0, and my
knowledge about both Ruby and Rails are on a basic level (but definitely
does exist), but I''m in no means near being an expert yet.
In
2008 Jan 11
13
Role of stories vs specs, revisited
A couple months ago I asked how stories and specs might impact each
other. [1] If you look at Dan North''s example of what''s in a story
[2], and you imagine using the spec framework to drive the design, you
can probably imagine a significant bit of overlap in the two. Is that
a bad thing? I''m not sure. It has made me a bit uncomfortable
though, and I''ve
2007 Aug 10
3
FixtureScenarios
This may have turned up in the RSS feeds of many of you already, but
for those who haven''t seen it yet, looks intersting:
<http://errtheblog.com/post/7708>
> The main problem with fixtures, for me, has always been how unfun
> they are. They literally suck the fun out of anything they?re
> around. You throw them in your test/ directory, then suddenly
> testing
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'',
2009 Mar 25
5
[Cucumber] ANN: Cucumber with pure Java
Big news for all Java programmers out there.
Now you can use Cucumber with pure Java!
That''s right, you don''t have to write a single line of Ruby! (1)
All of your step definitions can be written as annotated methods in POJOs
(Plain Old Java Objects).
To get a taste of what this looks like, check out the simple example in the
cucumber_java project on GitHub:
* README for
2009 Apr 27
2
uninitialized constant ActionController running Cucumber features in Aptana/RadRails IDE
I''m just starting on BDD. I installed the gems for webrats and
cucumber.
I also ran the following in the Ruby shell:
>rake gems:install RAILS_EN=test
>script/generate cucumber
These commands seemed to create the expected features and lib folders
in my project.
I''m using the eclipse framework with Aptana and RadRails as my IDE.
However, when I run:
>cucumber features
2008 Sep 09
8
Cucumber and fixtures/FixtureReplacement
Hey guys,
I''d never used RSpec Stories before, so I decided to follow the
apparent direction of the wind and just jump right into cucumber. I''m
dabbling with/using Cucumber and really like it. Good job, aslak!
Where i''m struggling right now is using either fixtures or a model
factory methodology like the FixtureReplacement. In both cases, I''m
not
2009 Feb 02
5
[Cucumber] Cucumber and acts_as_xapian
Hey list,
Anyone have experience with acts_as_xapian and Cucumber? I''m
struggling with updating xapian''s index, to actually "find" fluff
that has been indexed..
In a scenario, I''m adding a bunch of articles, and in the actual
search step, I run:
When "I search for \"$query\"" do |query|
%x[rake RAILS_ENV=test xapian:update_index]
2008 Aug 29
3
BDDish rspecish question
Hey list,
This is a kinda quirky question for this list, but I do think it
belongs here. I''m currently writing an app with users with different
roles. Roles are sequentially so to speak, so role 2 can do everything
role 1 can, and so on.
If I truly test my whole app, I should test all behaviour for each
role, I guess. I could solve that by doing some clever shared steps
and
2007 Apr 13
21
ZenTest autotest now handles RSpec, yay!
Josh Knowles http://joshknowles.com/ just let me know that ZenTest Autotest
3.50 now handles your RSpec specs.
http://blog.zenspider.com/archives/2007/04/zentest_version_350_has_been_released.html
That''s a great news.
Josh also shared with me a quick hack to make autotest work with only the
RSpec plugin installed.
Add the following into your ~/.autotest file
2006 Oct 15
2
*what* to test?
So I dig rspec and BDD, of course. I thought that Dave''s Google Video
was a great intro () -- even if it was a bit heavy on theory and a bit
loose on the nuts and bolts. But I don''t see anyone sufficiently
answering the big question:
What do you test? How do you define higher level and lower level
behaviors that should have tests written for them?