[rspec-users] Executing multiple rspec scripts

Robert Stagner restagner at gmail.com
Fri Jul 11 12:55:22 EDT 2008

Actually, I'm a member of the QA team (limited development experience).  So,
we are attempting to use RSpec without rails.  What is Rake?  Near the end
of your response, you list a way of running multiple spec files by creating
a spec task. Since, I'm not a developer, could you please provide me with a
clear example on how to do this? Or, if there is an alternative method on
doing this, please let me know. Thanks again.

My current setup is:

1 spec file that relies on accessing a module of classes to perform Watir
web app testing.  I've included a sample of the code below

describe LoginWelcomeScreen do
  describe "using IE Explorer" do
    before(:each) do
      @login = LoginWelcomeScreen.new(IEWebBrowser.instance)

    it "should support a username text field" do
      @login.test_username_field.should be_an_instance_of(Watir::TextField)

    it "should support a password text field" do

On Thu, Jul 10, 2008 at 8:17 PM, Ben Mabey <ben at benmabey.com> wrote:

> Robert Stagner wrote:
>> I'm new to RSpec.  I've just installed the gem and begun experimenting
>> with developing several scripts. From what I've seen thus far, it looks like
>> it will aid our QA team in testing many web applications.  Is there a way to
>> execute multiple rspec test scripts from one central file?
>> --
>> Regards,
>> Robert
> Robert,
> Welcome to rspec!  There are a number of ways you can do this.  You can
> do it with the command line:
> spec spec/*_spec.rb
> The way it is generally done is by using a rake task however...
> Are you using rails?  If so.. have you run "./script/generate rspec"?
> That will install a spec task for you so you just have to type "rake
> spec" to run all of your specs.
> If you are in a normal ruby app then you can create your own spec task
> by putting this in your Rakefile or tasks dir:
>  require 'rubygems'
>  require 'spec'
>  require 'spec/rake/spectask'
> desc "Run the specs under spec/models"
> Spec::Rake::SpecTask.new do |t|
>  t.spec_files = FileList['spec/*_spec.rb']
> end
> If you provide more information on what your setup is we could help more.
> -Ben
> http://benmabey.com
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20080711/31681bb3/attachment.html>

More information about the rspec-users mailing list