Skip to content
This repository
Browse code

Steak 2 rewrite driven by a new README

  • Loading branch information...
commit b39daa3257eba7a4722feda900bdbc97d6c98fce 0 parents
Luismi Cavallé authored March 12, 2011
3  .gitignore
... ...
@@ -0,0 +1,3 @@
  1
+pkg/*
  2
+*.gem
  3
+.bundle
2  Gemfile
... ...
@@ -0,0 +1,2 @@
  1
+source "http://rubygems.org"
  2
+gemspec
20  LICENSE
... ...
@@ -0,0 +1,20 @@
  1
+Copyright (c) 2009-2011 Luismi Cavallé
  2
+
  3
+Permission is hereby granted, free of charge, to any person obtaining
  4
+a copy of this software and associated documentation files (the
  5
+"Software"), to deal in the Software without restriction, including
  6
+without limitation the rights to use, copy, modify, merge, publish,
  7
+distribute, sublicense, and/or sell copies of the Software, and to
  8
+permit persons to whom the Software is furnished to do so, subject to
  9
+the following conditions:
  10
+
  11
+The above copyright notice and this permission notice shall be
  12
+included in all copies or substantial portions of the Software.
  13
+
  14
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  15
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  16
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  17
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  18
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  19
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  20
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
107  README.md
Source Rendered
... ...
@@ -0,0 +1,107 @@
  1
+# Steak
  2
+
  3
+The delicious combination of RSpec and Capybara for Acceptance BDD
  4
+
  5
+![Steak!!](http://dl.dropbox.com/u/645329/steak_small.jpg "Steak!!")
  6
+
  7
+## What is Steak?
  8
+
  9
+Steak is a minimal extension of RSpec-Rails that adds several conveniences to do acceptance testing of Rails applications using Capybara. It's an alternative to Cucumber in plain Ruby. This is how and acceptance spec looks like in Steak:
  10
+
  11
+    feature "Main page" do
  12
+
  13
+      background do
  14
+        create_user :login => "jdoe"
  15
+      end
  16
+
  17
+      scenario "should show existing quotes" do
  18
+        create_quote :text => "The language of friendship is not words, but meanings",
  19
+                     :author => "Henry David Thoreau"
  20
+
  21
+        login_as "jdoe"
  22
+        visit "/"
  23
+
  24
+        within(".quote") do
  25
+          page.should have_content("The language of friendship is not words, but meanings")
  26
+          page.should have_content("Henry David Thoreau")
  27
+        end
  28
+      end
  29
+      
  30
+    end
  31
+
  32
+No givens, whens or thens. No steps, no english, just Ruby. The delicious combination of RSpec and Capybara. That's Steak!
  33
+
  34
+## Why Steak?
  35
+
  36
+If, after all, this is just RSpec + Capybara, why does Steak even exist? Do I really need it?
  37
+
  38
+Basically Steak exists for three reasons:
  39
+
  40
+1. **Making a point**. First of all, Steak proposes that using RSpec and Capybara for acceptance testing is a sensible alternative to Cucumber. It also sets a name to refer to that approach.
  41
+1. **Adding convenience**. As a gem, Steak aims to make the experience as convenient as possible. It provides several Rails generators and Rake tasks so that setting up a new project or creating and running specs are quick and seamless tasks. A natural extension of RSpec-Rails.
  42
+1. **Building a community**. No development approach or ruby gem is really valuable without an active community behind it. The mailing list, the IRC channel, the wiki or the twitter account are useful tools to build a community of users that help each other by sharing knowledge, resources and best practices.
  43
+
  44
+## Getting Started
  45
+
  46
+_NOTE: The latest version of Steak assumes that you're testing a Rails 3 application, with RSpec 2 and Capybara. For Rails 2, RSpec 1 or Webrat you should use Steak 1.x (or consider upgrading to non-obsolete technologies ;P)_
  47
+
  48
+It's super-easy to get you started. Just add the gem to your `Gemfile`…
  49
+
  50
+    group 'test' do
  51
+      gem 'steak'
  52
+      # ...
  53
+
  54
+…and then install the gem and run the generator:
  55
+
  56
+    $ bundle
  57
+    $ rails g steak:install
  58
+
  59
+You're now set up! Take a look at the default directory structure you've got under `spec/acceptance`. It will help you organize the helpers and configurations for your acceptance specs.
  60
+
  61
+Note that Steak is the only dependency you really need, you can safely remove any reference to `capybara`, `rspec-rails` or `rspec` from your `Gemfile`, they will be included by Steak. Also note that, unless previously executed, Steak will run the RSpec generator so you don't need to invoke it.
  62
+
  63
+## Creating and running specs
  64
+
  65
+You can create your specs by hand, however you may prefer to use the generator:
  66
+
  67
+    $ rails g steak:spec my_first_feature
  68
+
  69
+To run your acceptance specs you just do like with any other spec…
  70
+
  71
+    $ rspec spec/acceptance/my_first_feature_spec.rb
  72
+
  73
+…or using rake:
  74
+
  75
+    $ rake spec:acceptance
  76
+
  77
+## Resources
  78
+
  79
+* [Source code](http://github.com/cavalle/steak) – Lurking and forking
  80
+* [Issues](http://github.com/cavalle/steak/issues) – Bugs and feature requests
  81
+* [Google Group](http://groups.google.com/group/steakrb) & [IRC channel](irc://irc.freenode.net/jenkinsci) – Help and discussion
  82
+* [Twitter](http://twitter.com/steakrb) – Announcements and mentions
  83
+* [Wiki](https://github.com/cavalle/steak/wiki) – Tutorials, docs and other resources
  84
+
  85
+## Credits
  86
+
  87
+Steak was created by [Luismi Cavallé](http://lmcavalle.com) and improved thanks to the love from:
  88
+
  89
+* Álvaro Bautista
  90
+* Felipe Talavera
  91
+* Paco Guzmán
  92
+* Jeff Kreeftmeijer
  93
+* Jaime Iniesta
  94
+* Emili Parreño
  95
+* Andreas Wolff
  96
+* Wincent Colaiuta
  97
+* Falk Pauser
  98
+* Francesc Esplugas
  99
+* Raúl Murciano
  100
+* Enable Interactive
  101
+* Vojto Rinik
  102
+* Fred Wu
  103
+* Sergio Espeja
  104
+* Joao Carlos
  105
+
  106
+Copyright © 2009 - 2011 Luismi Cavallé, released under the MIT license
  107
+
2  Rakefile
... ...
@@ -0,0 +1,2 @@
  1
+require 'bundler'
  2
+Bundler::GemHelper.install_tasks
1  lib/steak.rb
... ...
@@ -0,0 +1 @@
  1
+# Your code goes here...
3  lib/steak/version.rb
... ...
@@ -0,0 +1,3 @@
  1
+module Steak
  2
+  VERSION = "2.0.0.a0"
  3
+end
24  steak.gemspec
... ...
@@ -0,0 +1,24 @@
  1
+# -*- encoding: utf-8 -*-
  2
+$:.push File.expand_path("../lib", __FILE__)
  3
+require "steak/version"
  4
+
  5
+Gem::Specification.new do |s|
  6
+  s.name        = "steak"
  7
+  s.version     = Steak::VERSION
  8
+  s.platform    = Gem::Platform::RUBY
  9
+  s.date        = Date.today.to_s
  10
+
  11
+  s.authors     = ["Luismi Cavallé"]
  12
+  s.email       = "luismi@lmcavalle.com"
  13
+  s.homepage    = "http://github.com/cavalle/steak"
  14
+
  15
+  s.summary     = %q{The delicious combination of RSpec and Capybara for Acceptance BDD}
  16
+  s.description = %q{Steak is a minimal extension of RSpec-Rails that adds several conveniences to do acceptance testing of Rails applications using Capybara. It's an alternative to Cucumber in plain Ruby.}
  17
+  s.has_rdoc    = false
  18
+
  19
+  s.files       = Dir['LICENSE', 'README.md', 'lib/**/*'] & `git ls-files`.split("\n")
  20
+  s.test_files  = `git ls-files -- spec/**/*`.split("\n")
  21
+
  22
+  s.add_dependency  'rspec-rails', '>= 2.5.0'
  23
+  s.add_dependency  'capybara', '>= 1.0.0'
  24
+end

0 notes on commit b39daa3

Please sign in to comment.
Something went wrong with that request. Please try again.