Permalink
Browse files

Adding cucumber support to typo

  • Loading branch information...
1 parent 8361429 commit ac8b263a7b5b7ee9f41dcc0604c38f5c87abb5bf @jeady jeady committed Jun 16, 2012
View
@@ -50,4 +50,9 @@ group :development, :test do
gem 'rspec-rails', '~> 2.0'
gem 'simplecov', :require => false
gem 'sqlite3'
+ gem 'cucumber'
+ gem 'cucumber-rails'
+ gem 'cucumber-rails-training-wheels'
+ gem 'database_cleaner'
+ gem 'capybara'
end
View
@@ -36,23 +36,50 @@ GEM
arel (2.0.10)
bluecloth (2.2.0)
builder (2.1.2)
+ capybara (1.1.2)
+ mime-types (>= 1.16)
+ nokogiri (>= 1.3.3)
+ rack (>= 1.0.0)
+ rack-test (>= 0.5.4)
+ selenium-webdriver (~> 2.0)
+ xpath (~> 0.1.4)
+ childprocess (0.3.2)
+ ffi (~> 1.0.6)
coderay (0.9.8)
columnize (0.3.6)
+ cucumber (1.1.9)
+ builder (>= 2.1.2)
+ diff-lcs (>= 1.1.2)
+ gherkin (~> 2.9.0)
+ json (>= 1.4.6)
+ term-ansicolor (>= 1.0.6)
+ cucumber-rails (1.3.0)
+ capybara (>= 1.1.2)
+ cucumber (>= 1.1.8)
+ nokogiri (>= 1.5.0)
+ cucumber-rails-training-wheels (1.0.0)
+ cucumber-rails (>= 1.1.1)
+ database_cleaner (0.7.2)
diff-lcs (1.1.3)
erubis (2.6.6)
abstract (>= 1.0.0)
factory_girl (2.2.0)
activesupport
+ ffi (1.0.11)
flickraw (0.9.5)
flickraw-cached (20110920)
flickraw (>= 0.9)
+ gherkin (2.9.3)
+ json (>= 1.4.6)
htmlentities (4.3.1)
i18n (0.5.0)
json (1.6.5)
kaminari (0.13.0)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
railties (>= 3.0.0)
+ libwebsocket (0.1.3)
+ addressable
linecache19 (0.5.12)
ruby_core_source (>= 0.1.4)
mail (2.2.19)
@@ -115,12 +142,20 @@ GEM
ruby_core_source (0.1.5)
archive-tar-minitar (>= 0.5.2)
rubypants (0.2.0)
+ rubyzip (0.9.7)
+ selenium-webdriver (2.21.2)
+ childprocess (>= 0.2.5)
+ ffi (~> 1.0)
+ libwebsocket (~> 0.1.3)
+ multi_json (~> 1.0)
+ rubyzip
simplecov (0.6.1)
multi_json (~> 1.0)
simplecov-html (~> 0.5.3)
simplecov-html (0.5.3)
sqlite3 (1.3.5)
subexec (0.0.4)
+ term-ansicolor (1.0.7)
thor (0.14.6)
treetop (1.4.10)
polyglot
@@ -131,6 +166,8 @@ GEM
nokogiri (>= 1.2.0)
rack (>= 1.0)
rack-test (>= 0.5.3)
+ xpath (0.1.4)
+ nokogiri (~> 1.3)
PLATFORMS
ruby
@@ -139,21 +176,26 @@ DEPENDENCIES
RedCloth (~> 4.2.8)
acts_as_list
acts_as_tree_rails3
- addressable (~> 2.1.0)
- bluecloth (>= 2.0.5)
+ addressable (~> 2.1)
+ bluecloth (~> 2.1)
+ capybara
coderay (~> 0.9)
- factory_girl (= 2.2.0)
+ cucumber
+ cucumber-rails
+ cucumber-rails-training-wheels
+ database_cleaner
+ factory_girl (~> 2.2)
flickraw-cached
htmlentities
json
kaminari
- mini_magick (= 1.3.3)
+ mini_magick (~> 1.3.3)
pg
- rails (= 3.0.10)
- rake (>= 0.9.2)
+ rails (~> 3.0.10)
+ rake (~> 0.9.2)
recaptcha
require_relative
- rspec-rails (>= 2.0.0.beta.20)
+ rspec-rails (~> 2.0)
ruby-debug19
rubypants (~> 0.2.0)
simplecov
View
@@ -0,0 +1,8 @@
+<%
+rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
+rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
+std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags ~@wip"
+%>
+default: <%= std_opts %> features
+wip: --tags @wip:3 --wip features
+rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
View
@@ -3,7 +3,7 @@ development:
database: db/db_development
timeout: 5000
-test:
+test: &test
adapter: sqlite3
database: db/db_test
timeout: 5000
@@ -12,3 +12,6 @@ production:
adapter: postgresql
database: db_production
timeout: 5000
+
+cucumber:
+ <<: *test
@@ -5,7 +5,7 @@
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped
# and recreated between test runs. Don't rely on the data there!
- config.cache_classes = false
+ config.cache_classes = true
# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true
View
@@ -5,3 +5,40 @@
#
# cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
# Mayor.create(:name => 'Daley', :city => cities.first)
+Blog.create(:id => 1, :settings => {"canonical_server_url"=>""})
+Category.create(:id => 1, :name => "General", :permalink => "general", :position => 1)
+Content.create(:allow_comments => true, :allow_pings => true, :author => "Mr Typo", :body => "Welcome to Typo. This is your first article. Edit or delete it, then start blogging!", :guid => "1bf3e2ca-ed7b-4562-8a4a-8ce8438822c8", :id => 1, :permalink => "hello-world", :post_type => "read", :published => true, :published_at => "2012-06-09 21:51:55 UTC", :settings => {"password"=>nil}, :state => "published", :text_filter_id => 5, :title => "Hello World!", :type => "Article", :user_id => 1)
+Content.create(:body => "This is an example of a Typo page. You can edit this to write information about yourself or your site so readers know who you are. You can create as many pages as this one as you like and manage all of your content inside Typo.", :id => 2, :name => "about", :post_type => "read", :published => true, :published_at => "2012-06-09 21:51:55 UTC", :settings => {"password"=>nil}, :state => "published", :text_filter_id => 5, :title => "about", :type => "Page", :user_id => 1)
+Profile.create(:id => 1, :label => "admin", :modules => [:dashboard, :articles, :pages, :media, :feedback, :themes, :sidebar, :users, :settings, :profile, :seo], :nicename => "Typo administrator")
+Profile.create(:id => 2, :label => "publisher", :modules => [:dashboard, :articles, :media, :pages, :feedback, :profile], :nicename => "Blog publisher")
+Profile.create(:id => 3, :label => "contributor", :modules => [:dashboard, :profile], :nicename => "Contributor")
+Right.create(:description => "Global administration", :id => 1, :name => "admin")
+Right.create(:description => "Create article", :id => 2, :name => "content_create")
+Right.create(:description => "Edit article", :id => 3, :name => "content_edit")
+Right.create(:description => "Delete article", :id => 4, :name => "content_delete")
+Right.create(:description => "Create a category", :id => 5, :name => "category_create")
+Right.create(:description => "Edit a category", :id => 6, :name => "category_edit")
+Right.create(:description => "Delete a category", :id => 7, :name => "category_delete")
+Right.create(:description => "Create a category", :id => 8, :name => "page_create")
+Right.create(:description => "Edit a category", :id => 9, :name => "page_edit")
+Right.create(:description => "Delete a category", :id => 10, :name => "page_delete")
+Right.create(:description => "Add a comment", :id => 11, :name => "feedback_create")
+Right.create(:description => "Edit self comments", :id => 12, :name => "feedback_self_edit")
+Right.create(:description => "Edit any comment", :id => 13, :name => "feedback_edit")
+Right.create(:description => "Delete self comments", :id => 14, :name => "feedback_self_delete")
+Right.create(:description => "Delete any comment", :id => 15, :name => "feedback_delete")
+Right.create(:description => "Create users", :id => 16, :name => "user_create")
+Right.create(:description => "Edit users", :id => 17, :name => "user_edit")
+Right.create(:description => "Edit self account", :id => 18, :name => "user_self_edit")
+Right.create(:description => "Delete users", :id => 19, :name => "user_delete")
+Sidebar.create(:active_position => 0, :config => {"maximum_pages"=>"10"}, :id => 1, :staged_position => 0, :type => "PageSidebar")
+Sidebar.create(:active_position => 1, :config => {"empty"=>false, "count"=>true}, :id => 2, :staged_position => 1, :type => "CategorySidebar")
+Sidebar.create(:active_position => 2, :config => {"show_count"=>true, "count"=>"10"}, :id => 3, :staged_position => 2, :type => "ArchivesSidebar")
+Sidebar.create(:active_position => 3, :config => {"body"=>"<ul>\n <li><a href=\"http://www.typosphere.org\" title=\"Typo\">Typosphere</a></li>\n <li><a href=\"http://typogarden.org\">Typogarden</a></li>\n <li><a href=\"http://t37.net\" title=\"Blog Exp\xC3\xA9rience utilisateur\">Fr\xC3\xA9d\xC3\xA9ric</a></li>\n <li><a href=\"http://www.matijs.net/\" title=\"Matijs\">Matijs</a></li>\n<li><a href=\"http://elsif.fr\" title=\"Yannick\">Yannick</a></li>\n<li><a href=\"http://blog.ookook.fr\" title=\"Thomas\">Thomas</a></li>\n<li><a href=\"http://blog.shingara.fr\" title=\"Cyril\">Cyril</a></li>\n\n\
+ </ul>\n", "title"=>"Links"}, :id => 4, :staged_position => 3, :type => "StaticSidebar")
+Sidebar.create(:active_position => 4, :config => {"title"=>"Meta"}, :id => 5, :staged_position => 4, :type => "MetaSidebar")
+TextFilter.create(:description => "None", :filters => [], :id => 1, :markup => "none", :name => "none", :params => {})
+TextFilter.create(:description => "Markdown", :filters => [], :id => 2, :markup => "markdown", :name => "markdown", :params => {})
+TextFilter.create(:description => "SmartyPants", :filters => [:smartypants], :id => 3, :markup => "none", :name => "smartypants", :params => {})
+TextFilter.create(:description => "Markdown with SmartyPants", :filters => [:smartypants], :id => 4, :markup => "markdown", :name => "markdown smartypants", :params => {})
+TextFilter.create(:description => "Textile", :filters => [], :id => 5, :markup => "textile", :name => "textile", :params => {})
@@ -0,0 +1,9 @@
+Feature: Create Blog
+ As an author
+ In order to gift my thoughts to the world
+ I want to create a blog
+
+ Scenario: Create blog page shown
+ Given I am on the home page
+ Then I should see "Welcome"
+ And I should see "My Shiny Weblog!"
Oops, something went wrong.

0 comments on commit ac8b263

Please sign in to comment.