Adam Reed
2007-Sep-18 15:20 UTC
[rspec-users] FW: Specifying spec and output format inline?
Anyone have any advice on this one? Thanks, Adam ________________________________ From: rspec-users-bounces at rubyforge.org [mailto:rspec-users-bounces at rubyforge.org] On Behalf Of Adam Reed Sent: Monday, September 17, 2007 2:14 PM To: rspec-users at rubyforge.org Subject: [rspec-users] Specifying spec and output format inline? Howdy from Austin, TX. I''m new to rspec, and am currently using it with the Watir testing library for web testing. I''m moving along at an ok pace so far, but I had a question. I just realized I could require ''spec'' and forego running scripts from the command line. However, this limits me in my output formats. Is there a way that I can specify which format to use and where to save it inside the script? I''ve included the full script below. Thanks, Adam $LOAD_PATH.unshift File.join(File.dirname(__FILE__), ''..'') if $0 =__FILE__ #set the local dir path require ''watir'' require ''spec'' describe "Project name" do before(:all) do @browser = Watir::IE.new @browser.goto "http://localhost:8080/admin_frnPkg_add.html <http://localhost:8080/admin_frnPkg_add.html> " end #begin ## Basic page validation it "should have the logo" do @browser.image(:src, /cp_logo.gif/).should_not be_nil end #logo it "should have login/logout text" do login = @browser.table(:index, 1)[2][1].text login.should =~ (/Log/) end #login/logout after(:all) do @browser.close end #after end #Project name -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070918/413e4fd4/attachment.html -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ATT2470971.txt Url: http://rubyforge.org/pipermail/rspec-users/attachments/20070918/413e4fd4/attachment.txt
David Chelimsky
2007-Sep-18 15:33 UTC
[rspec-users] FW: Specifying spec and output format inline?
On 9/18/07, Adam Reed <areed at relocationcentral.com> wrote:> > > Anyone have any advice on this one? > > Thanks, > Adam > > ________________________________ > From: rspec-users-bounces at rubyforge.org > [mailto:rspec-users-bounces at rubyforge.org] On Behalf Of > Adam Reed > Sent: Monday, September 17, 2007 2:14 PM > To: rspec-users at rubyforge.org > Subject: [rspec-users] Specifying spec and output format inline? > > > > Howdy from Austin, TX. > > I''m new to rspec, and am currently using it with the Watir testing library > for web testing. I''m moving along at an ok pace so far, but I had a > question. > > I just realized I could require ''spec'' and forego running scripts from the > command line. However, this limits me in my output formats. Is there a way > that I can specify which format to use and where to save it inside the > script?It sort of depends - how do you plan to run them?> > I''ve included the full script below. > > Thanks, > Adam > > $LOAD_PATH.unshift File.join(File.dirname(__FILE__), ''..'') if $0 == __FILE__ > #set the local dir path > > require ''watir'' > require ''spec'' > > describe "Project name" do > before(:all) do > @browser = Watir::IE.new > @browser.goto > "http://localhost:8080/admin_frnPkg_add.html" > end #begin > > ## Basic page validation > it "should have the logo" do > @browser.image(:src, /cp_logo.gif/).should_not be_nil > end #logo > > it "should have login/logout text" do > login = @browser.table(:index, 1)[2][1].text > login.should =~ (/Log/) > end #login/logout > > after(:all) do > @browser.close > end #after > end #Project name > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Adam Reed
2007-Sep-18 18:21 UTC
[rspec-users] FW: Specifying spec and output format inline?
I run my scripts from a windows environment and execute them manually in SciTE with F5. I also have a Rails app that runs them from the web via a batch file on the server, but I can easily change this batch to include the parameters. So, I''m looking for some declaration that can be included in the spec file itself, sort of like the require ''spec'' statement. Thanks, Adam -----Original Message----- From: rspec-users-bounces at rubyforge.org [mailto:rspec-users-bounces at rubyforge.org] On Behalf Of David Chelimsky Sent: Tuesday, September 18, 2007 10:34 AM To: rspec-users Subject: Re: [rspec-users] FW: Specifying spec and output format inline? On 9/18/07, Adam Reed <areed at relocationcentral.com> wrote:> > > Anyone have any advice on this one? > > Thanks, > Adam > > ________________________________ > From: rspec-users-bounces at rubyforge.org > [mailto:rspec-users-bounces at rubyforge.org] On Behalf Of Adam Reed > Sent: Monday, September 17, 2007 2:14 PM > To: rspec-users at rubyforge.org > Subject: [rspec-users] Specifying spec and output format inline? > > > > Howdy from Austin, TX. > > I''m new to rspec, and am currently using it with the Watir testing > library for web testing. I''m moving along at an ok pace so far, but I> had a question. > > I just realized I could require ''spec'' and forego running scripts from> the command line. However, this limits me in my output formats. Is > there a way that I can specify which format to use and where to save > it inside the script?It sort of depends - how do you plan to run them?> > I''ve included the full script below. > > Thanks, > Adam > > $LOAD_PATH.unshift File.join(File.dirname(__FILE__), ''..'') if $0 =__FILE__ > #set the local dir path > > require ''watir'' > require ''spec'' > > describe "Project name" do > before(:all) do > @browser = Watir::IE.new > @browser.goto > "http://localhost:8080/admin_frnPkg_add.html" > end #begin > > ## Basic page validation > it "should have the logo" do > @browser.image(:src, /cp_logo.gif/).should_not be_nil > end #logo > > it "should have login/logout text" do > login = @browser.table(:index, 1)[2][1].text > login.should =~ (/Log/) > end #login/logout > > after(:all) do > @browser.close > end #after > end #Project name > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >_______________________________________________ rspec-users mailing list rspec-users at rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users
Reasonably Related Threads
- Specifying spec and output format inline?
- FW: FW: Specifying spec and output format inline?
- Clicking on links within facebook iframes (facebook apps)
- Restful-Authentication Rspec Failure Rails 2.0.2
- added new cool matcher into my framework WatirSplash - #in