Displaying 20 results from an estimated 30 matches for "railsstory".
2007 Oct 16
5
RailsStory - lessons learned
After trying RailsStory for a few days, I have learned:
1. Rails testing support does not serve up static pages
2. RailsStory masks errors generated by the app under test
3. The masked errors are available in log/test
4. I should read log/test more often
See http://pastie.caboo.se/107876 for an example for points 2...
2007 Oct 16
6
RailsStory runner - empty response
...new rails app then installed rspec and rspec_on_rails from
trunk.
I then created a sample story:
require File.dirname(__FILE__) + "/helper"
Story "View Home Page", %{
As a user
I want to view my home page
So that I can get a birds eye view of the system
}, :type => RailsStory do
Scenario "Publisher with no videos" do
When "visiting", "/" do |page|
get page
end
Then "viewer should see", "companies/show_initial" do |template|
response.should have_text(/Welcome/)
end
end
end
When...
2008 Mar 14
5
Branching scenarios, GivenScenario and database
I''m trying to use stories to drive some high-level design.
I''ve got some branching scenarios where I want to follow a scenario,
to establish a base situation, and then have different scenarios which
''branch'' out from that state, possibly several levels deep.
I asked a bit about this a few days ago, and David pointed out the
rather undocumented GivenScenario
2007 Nov 26
8
Renaming RailsExample to RailsExampleGroup
Fyi, I made the following renames:
* RailsExample -> RailsExampleGroup
* FunctionalExample -> FunctionalExampleGroup
* ControllerExample -> ControllerExampleGroup
* ViewExample -> ViewExampleGroup
* HelperExample -> HelperExampleGroup
* ModelExample -> ModelExampleGroup
This was done to keep the naming consistent with ExampleGroup.
2008 Jun 09
6
Selenium/Watir usage along side Webrat in story testing
...**two syntaxes I have to use**. When I have common Givens
like login I have to duplicate the Given, one for Selenium one for
Webrat.
So I was thinking of ways to avoid this duplication:
Create two classes (this is already what MHS_testing has done for
Selenium)
----
class RailsSeleniumStory < RailsStory
class RailsWebratStory < RailsStory
----
Create a common interface for all shared functionailty.
(I suspect Webrat represents the smallest set of functionality -
Selenium can do everything Webrat can do but not the other way around).
The different UI testing frameworks implement such interface...
2007 Nov 13
7
rails story runner returning a nil response code
Has anyone noticed any problems with the Rails story runner returning
a response code of "0" when doing get/post/etc methods? I just
grabbed the latest rails/rspec and just started noticing this problem,
http://pastie.caboo.se/117497
Regular controller specs pass as expected.
--
Josh Knowles
phone: 509-979-1593
email: joshknowles at gmail.com
web: http://joshknowles.com
2008 May 30
4
RSpec Post/Get and Sessions in a Story
I''ve got an RSpec story that reads like:
-------------------------------------------------------------------
Given that a post exists
And I am logged in
And I have edit permissions
When I visit the post details page
Then there should be a link to add a new comment
-------------------------------------------------------------------
The issue I''m having is that I can''t
2007 Sep 23
4
Story Runner, autoincrementing
...practice is to state the paths as strings instead
of using the nested routes.
require File.join(File.dirname(__FILE__), "helper")
Story "User creates a new topic", %{
As a user
I want to create a new topic
So that I can dicuss Nick''s Mom
}, :type => RailsStory do
Scenario "Successfully create a new topic in the ''General'' forum" do
Given "a user named", "Jon" do |login|
@user = create_user login
end
Given "a forum named", "General" do |name|
@forum = create_for...
2007 Nov 13
3
Story problem if parenthesis used in Given, When, Then or And
...t edge version
XP/Cygwin on XP
Hi,
I hit this when trying to use parenthesis in my stories ... (that''ll teach
me!).
If a scenario looks like the following:
Story "User has story with parentheses", %{
As a user
I want parenthesis
So that ... well I just do
}, :type => RailsStory do
Scenario "the Given has parentheses" do
Given "parenthesis () in the given " do
end
When "anything" do
end
Then "The error occurred while evaluating nil.perform " do
end
end
end
This fails with the following:
The error occ...
2008 Jan 16
1
session data and user stories
...Then("I should be sent to the dealer landing page") do
puts @session.response.instance_variable_get("@redirected_to").should
== {:controller => "dealers"}
end
end
with_steps_for(:dealer_login) do
run_local_story "dealer_story", :type=>RailsStory
end
there is a good chance someone has already covered this and i have just
managed to miss it. documentation on rbehave is sparse (at best, as i have
seen it. i have the peepcode, but if anyone has any other good resources i
would be more than appreciative.)
in the event that this has not been a...
2008 Jun 24
1
Suggestions on how to use stub_model with webrat?
Hi all,
I am using story runner with webrat, but I am not sure how to
incorporate stub_model into my tests.
The webrat steps only care about the user interface and have nothing
to say about interaction with the database.
Following Ben Mabey, I have a line in my story like:
"When clicks the Create button"
And a step like:
When "clicks the $button button" do |button|
2007 Oct 05
2
Stories VS Scenarios
...step) I will be asking different questions. Should I
write stories for each of these roles or should these just be scenarios
of the following story:
Story "Signin process", %{
As a person
I want to sign up for an account
So that I can view and contribute content
}, :type => RailsStory do
Scenario "An individual looking for support" do....
Or should I break them up into individual stories for each role?
Story "Signin process for an individual", %{
....
In all cases the underlying WHY is always the same. So for that reason
I think they should be in the sa...
2008 Jun 02
2
get method under 1.1.4 in Stories is undefined
HI,
After I upgraded to RSpec 1.1.4 (from git), my stories all failed. I
was using Webrat and the first thing I noticed was the ''visits'' method
was gone. I then backtracked to just using ''get'' and got the same
undefined method exception. I confirmed it was still working in 1.1.3
Eventually, I got it to work doing this:
in my first Given:
@app =
2008 May 22
2
Story / Redirection to static html within public
...s gives a 500 error). It does not seem to be able to
access any public/ content within the story.
Within step file of a story this always fails:
''get /index.html''
OR
visits ''/index.html''
I looked back at ActionController::IntegrationTest which seems to be
where RailsStory gets all its magic from. That lead me to believe that
perhaps this was a rails issue?
So I''m unsure if:
1. Accessing public/ within a story is just not supposed to be possible.
2. Accessing public/ within ActionController::IntegrationTest is not
suppose to be possible.
2. Rspec has a bu...
2007 Sep 25
7
simple story, extract link
hi,
I just started fooling around with story runner, thought I''d start
with a dead simple scenario:
The first thing I do when describing a site to someone is go to the
home page, and begin exploring public pages from there.
So, that seems like a good first story to spec out.
And I''d really like to extract the actual link from the rendered page
(rather than just
2007 Sep 14
2
Mocks in StoryRunner
..._) + "/../config/environment")
require ''spec''
require ''spec/rails''
require ''spec/rails/story_adapter''
Story ''Something happens'', %{
As a user
I want to do something
So that something will happen.
}, :type => RailsStory do
Scenario ''User doing something for first time'' do
Given ''a user'' do
@user = mock_model(User)
end
When ''the user makes a request'' do
end
Then ''something should happen'' do
end
end
end
Here&...
2008 May 23
10
View Specs vs. Stories
Do RSpec stories make view specs redundant? Does anybody spec their
views *and* use stories, and if so how?
Any views (no pun intended) appreciated.
~ Thanks
Mark
--
Posted via http://www.ruby-forum.com/.
2007 Sep 19
1
Strange error in StoryRunner (was: Mocks in StoryRunner)
...> require ''spec/rails''
> > require ''spec/rails/story_adapter''
> >
> > Story ''Something happens'', %{
> > As a user
> > I want to do something
> > So that something will happen.
> > }, :type => RailsStory do
> >
> > Scenario ''User doing something for first time'' do
> > Given ''a user'' do
> > @user = mock_model(User)
> > end
> > When ''the user makes a request'' do
> > end
> >...
2007 Dec 21
4
StoryRunner docs/guidance
Hi all,
Are there any plans for better documentation for the new StoryRunner
feature? I tried to use it today (with Rails), and had a hard time
getting my head around whether I was doing it "right" and exactly what
things are appropriate to test at that level (this might be exacerbated
by the fact that I''ve never really used integration testing that much).
A full example of
2008 Aug 28
1
rspec story - access session
Very simple, but not googlable: how do I access ''session'' in my story?
In rspec controller specs I could just say session[:user] for example,
but this doesn''t work here.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to