Displaying 20 results from an estimated 1000 matches similar to: "Confused - which is the correct Story API"
2007 Dec 31
4
How to run stories with `spec'' command?
Hi, all!
I have a story steps array.rb and the story array.story. I
can run it with
ruby array.rb
But when I execute
spec array.rb
nothing happened. I''m wondering how can I use spec command to
execute stories? (executing examples is OK) Or maybe another
question. If I have to run stories with `ruby'' command, how
can I choose the output format? (I think there''s
2008 Jan 16
1
session data and user stories
hello there,
i have been trying my hand at this rbehave material, specifically in terms
of integration testing a rails application, and i am curious about the most
friendly way to deal with session data.
currently, the only way i have found to simulate a session is to open a
session and refer to everything afterward via the @session variable stored
after open_session. it seems to be workable,
2008 Jan 14
6
RSpec stories introduction
I have played a bit with RSpec specs and now want to check out stories. I
note that there is no generator for rspec stories pre se (unless I managed
to miss all references to one ) and that the only directory relating to
stories added by installing rspec is ./stories itself.
The documentation at rspec.info seems to presume a great deal of prior
knowledge. What I am looking for is a guided tour
2008 Jun 09
6
Selenium/Watir usage along side Webrat in story testing
This is related to Selenium/Watir usage along side webrat in story
testing.
MHS_Testing and Rspec-ui provide some great help for testing through
frameworks like Selenium/Watir.
But there is something missing, Webrat has changed the landscape
somewhat with Acceptance Tests/Story Driven development.
Now I have a choice:
1. Tests and rails process run as one test process (Webrat)
2. Use
2008 Mar 20
5
sharing story steps
Hi,
How can I have a common set of steps that all my stories share?
i.e. My stories often start out looking like this:
Given a user Joe
Given a user Jordan
then:
Given("a user $username") do |username|
@users ||= {}
@user_sessions ||= {}
@users[username] = create_user(:username => username)
@user_sessions[username] = login_as(@users[username])
end
I want to share that
2008 Jun 14
15
Reusing story snippets
I find myself doing this:
Scenario "logged in user visiting the home page" do
Given "A logged in user" do
a_logged_in_user
end
When "..."
Then "..."
end
The a_logged_in_user method is a helper method in helper.rb which sets
up the state so that the user can browse the website.
Later in the story of course, I can just do ''Given
2007 Dec 29
5
./script/story command
Below I''ve pasted a ./script/story command I''ve been using for about a
week. It has three modes of operation:
1. ./script/story with no arguments will run all *.story files in the story path
2. ./script/story with a path or glob will run the specified stories
3. If input is passed in via STDIN, it runs that text as a story. This
opens up story running via a simple interface
2008 May 02
2
Return code for running stories
Hi all!
Just wrote a few stories and committed code to a project of mine,
then realized I made a mistake (with the commit, not the code or
tests). It would be nice to put the script
that runs the stories as a pre-commit hook, preventing the commit
from succeeding if the stories fail.
For that, I need to set the right exit code.
In turn, I need to know he result of the tests.
Given the
2009 Nov 26
1
Barplot with confidence intervals
I have a file in the following format:
Scenario1 Scenario1CIL Scenario1CIU Scenario2 Scenario2CIL Scenario2CIU
60 57 62 45 48 50
110 101 111 51 50 52
120 117 122 64 62 66
192 190 194 79 75 79
where:
First column = Scenario1 mean value
Second column = Scenario1 Low Confidence Interval
Third column = Scenario1 Upper Confidence Interval
Fourth column = Scenario2 mean value
Fifth column =
2009 Jan 30
3
Pass a variable from rake to steps file in cucumber
Can anybody tell me how to pass a variable from the rake command to my steps
file using cucumber? I have the following in my Rakefile:
## Rakefile
Cucumber::Rake::Task.new do |t|
profile = ENV[''PROFILE''] || ''default''
browser_type = ENV[''BROWSER''] || ''*chrome''
t.cucumber_opts = "--profile #{profile}"
end
I
2007 Dec 10
1
cyclic dependency error
Dear all,
I am encountering a cyclic dependency error when running R CMD check on an R package I wrote (R version 2.6.1, Mac OS X 10.4), see the error message below.
Creating a new generic function for "print" in "clValid"
Creating a new generic function for "summary" in "clValid"
Creating a new generic function for "plot" in
2017 Jul 05
1
How can I make the legend in ggplot2 the same height as my plot?
Hi R Users,
I tried to increase the legend height in ggplot2, but it did not respond at all using the follwoing code. Do you have any suggestions for me?
dat<-data.frame(temperature)
P1<-ggplot(dat, aes(X, Y))
Scenario1<-P1+geom_point(aes(colour = value), size = 1)+ theme_bw()+ theme(axis.text.x = element_blank(),axis.text.y = element_blank())
2007 Oct 24
1
Alternate File "require" line in TextMate bundle
Ok, this is INCREDIBLY finicky of me, and I''m a really finicky person
at the best of times, but I noticed that when you use the TM
Alternate File command to create specs, it does it with a header line
like this:
File.dirname(__FILE__) + ''/../../../spec_helper''
I use a header line like this
require File.expand_path(File.join(File.dirname(__FILE__), *%w
[..
2007 Nov 15
3
How to Run Rails Stories
I have non non-plain-text story without any steps_for, can it be run?
If so, how?
Thanks,
Nate
2007 Nov 14
5
ETA to Stories
Hey guys, just poppin in to ask if anyone knows when stories will be
somewhat stable? We''re starting to use integration tests at work,
we''re already using rspec, and I''d like to avoid integration tests if
possible.
Thanks,
Nate "fowlduck" Sutton
2007 Dec 28
0
rspec_autotest testing with the use of the controller Namespaces
Rails2.0 the official support of namespace, making it easier for
people with the usual habit of definition Controller
For example,We define the following Controller
admin/hacks_controller
this class namespace is Admin::HackController
When we use rspec_autotest for testing,Will be following error
no such file to load -- ./spec/views/hacks/../../spec_helper (LoadError)
The wrong reason is
2011 Aug 09
0
Devise, RSpec and Webrat
My app is builded with rails 2.3.12, rspec-rails 1.3.2, webrat 0.7.3.
My spec_helper.rb
ENV["RAILS_ENV"] ||= ''test''
require
File.expand_path(File.join(File.dirname(__FILE__),''..'',''config'',''environment''))
require ''spec/autorun''
require ''spec/rails''
require
2011 Dec 05
1
How to extend common helper methods to view specs?
Hi, there,
I have some methods which I have written as helpers.
They are in spec/support/controller_macros.rb (yes, I will change the
name soon).
The 2 methods, login_user and login_admin_user works in the
controller specs BUT fail to work in the view specs when I call them
in the view specs.
---------- spec/spec_helper.rb start --------------------------
# This file is copied to spec/
2013 Jun 18
1
Getting rspec error: Net::SMTPServerBusy: Relay access denied
I''m trying to test registration emails (sent with devise), and I keep
getting the error:
Net::SMTPServerBusy: 454 4.7.1 <model_spec-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org>: Relay access denied
I''m running Rails 3.2.11 with Capybara, and I have (temporarily) chopped my
spec_helper.rb and test.rb files down to the bare minimum, still getting
the error above.
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