Displaying 20 results from an estimated 30000 matches similar to: "Testing my scripts?"
2010 Jan 29
3
testing controllers using cucumber
Hello,
Is there any way to test controllers using cucumber.
I was doing it with rspec but since cucumber''s description is good how
can i proceed testing it with cucumber?
For e.g.
I have a scenario of user creation like
Feature: User Scenarios
Scenario: Successfull creation of user
Given a new user
When the user fill all the mandatory details
Then that user should get
2012 Feb 13
11
stale records with integration testing?
Hi,
I was writing an integration test for my user signup form (with
capybara), and found that my test was failing due to a validation error:
"email is already taken". I''m a bit confused because I thought when I
run "rspec spec/some_spec.rb", the test database would be wiped clear?
Is that not the case?
Patrick J. Collins
http://collinatorstudios.com
2006 Dec 27
2
DB-less rspec_on_rails
Hi!
I''m still struggling with RSpec to get it working with a Rails
application, that does not use a database. I removed all the db:*
dependencies from the RSpec targets, but it still wants to connect to a
database.
Any ideas?
bye,
Tobias
** Execute spec:models
/usr/bin/ruby1.8 -I"/var/lib/gems/1.8/gems/rspec-0.7.5/lib"
2009 Mar 31
7
[Cucumber] Running single feature from command line
I am using Cucumber 0.2.3 and am having problems running a single
feature. In particular, the cucumber Textmate bundle was not working
so I traced it back and discovered that I could not run single files
or features from the command line either. My setup has the following
line in cucumber.yml
default: -r features/support/env.rb -r features/support/plain.rb -r
features/steps
2008 Nov 04
8
Testing a wizard with Cucumber
Assuming you have a multi-step wizard like thing, with lots of different
states and paths through it. What approach would your use to write a feature
for it? What I want to do is do the separate states and then reuse these
things in more complex scenarios that cover paths. For example
Scenario: State A
Given I''m ...
And I''m ...
When I ...
Then I should see
And I at
2008 Nov 24
8
Cucumber Custom Logging
Where and how do you put custom logger statements in cucumber? I
understood (more or less) how to do this in rspec in the spec_helper
file but I do not know where to start with cucumber.
I want to add a simple identifying text line in the log file to assist
in picking through the output. Something akin to:
Running Scenario: X
Feature I should have this logged
....
Feature This should
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
2008 Dec 12
8
cucumber features HTML output bug with more than 100 steps
I''m having the following problem:
With the format as html, the output of cucumber stops coloring successful
steps green after step #100. This last line in the HTML is:
<script type="text/javascript">stepPassed(100)</script>
Steps 101 -n are colored grey. The <body> tag is not closed but all steps
are displayed. When running with ''format
2012 Feb 05
4
testing framework for test automation
Hello,
Anyone working in QA Test Automation with RSpec wouldn?t mind posting
their testing framework or know where I can go to get more info on
testing frameworks either with RSpec or Cucumber? I greatly
appreciate. Thank you.
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
2008 Dec 02
11
Any plans for Before-feature or Before-all steps in Cucumber?
Hi
The code I''m working on now is a server daemon that talks to Twitter,
an RSS feed, and some web pages. I''ve got mock implementations of
Twitter and the web stuff, which I start and stop with
daemon_controller[1]. I do all the setup in a Before block, but this
makes the feature runs agonisingly slow due to the time waiting for
everything to restart. I''m
2006 Dec 07
3
Newbie Error Running specs
I''m new to rspec. I just installed these:
rspec (0.7.4) RSpec-0.7.4 (r1201) (rspec gem)
rspec_on_rails .3 plugin (on vendor/plugin)
I''ve set up a simple spec - spec/library/test_spec.rb:
require File.dirname(__FILE__) + ''/../spec_helper''
context "test context" do
setup do
#nothing
end
specify "nothing to specify" do
2009 Nov 17
8
rspec-rails gem double quoting (My)SQL?
Hi all,
This seems like a plugin conflict (I haven''t yet had success replicating
this in a new project), but short version is: when I have "rspec-rails"
in my environment.rb plugin config, table names are double quoted in
mysql queries generated by my standard finders.
rspec-rails commented out:
SELECT * FROM `users` WHERE (`users`.`id` = ''159564615'')
2008 Nov 21
57
Spec''ing via features
As I work with Rails TestUnit tests I am reconsidering how to use
cucumber features. It seems to me that it might be best to have a
coherent view of how to arrange my test suites before I get much further
into this. Now, so far I have considered three possibilities:
1. Use features exclusively. Create a feature file for each model, one
for each controller and possibly an additional one for
2009 Mar 19
6
[Cucumber 0.2] Failure to use should
I have a step definition like this:
Then "the account should be created" do
account = Account.find_by_name("my shiny new account")
p account.class
account.should_not be_blank
end
When running this step, I got the error message:
Account(id: integer, name: string, state: string, next_renewal_at: date,
created_at: datetime, updated_at: datetime, full_domain: string,
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 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
2009 Feb 17
5
[Cucumber] Level of features / Feature dependent steps
Forgive the long post, just looking for input/advice/alternate
opinions..
Like many I think that going through the exercise of framing user
requests in Cucumber terms(Features, Scenarios..) really helps
facilitate necessary conversations and avoid time wasted implementing
the wrong thing(e.g. as a requirement/specification tool). However,
I''m a bit confused when it comes to
2008 Sep 29
3
rspec-ui overlap with cucumber?
Hi!
I''m using cucumber + selenium and I love it. However I''m looking to
add some methods (example: click_and_wait etc) to the lib. Therefore
looked around a bit and I got two questions:
Firstly about rspec-ui, I''m a little confused, does rspec-ui overlap
with its propose with webrat with cucumber or I''m missing a point?
Secondly, are there any plans to
2008 Dec 16
20
step definitons to check login
I am working with the authlogic gem and trying to create a simple login
test from cucumber features. The feature statement is:
Given the user is not logged in
The step definition for this is confounding me. In the
application_controller the authlogic tutorial recommends the following:
private
def require_user
unless current_user
store_location
flash[:notice] =