Browse files

updated libraries & fixed all tests

  • Loading branch information...
1 parent 483d244 commit 9a10e28459ab362eed9952ea488fa7bc8088a482 @hubertlepicki hubertlepicki committed Oct 11, 2012
View
8 Gemfile
@@ -11,13 +11,11 @@ if RUBY_VERSION < '1.9'
gem "ruby-debug", ">= 0.10.3"
end
-gem "diff-lcs", "1.1.2", :require => nil
-gem "rspec-rails"
+gem "diff-lcs", "1.1.3", :require => nil
+gem "rspec-rails", '>= 2.10.1'
-gem "steak", :git => "git://github.com/cavalle/steak.git"
-gem "capybara", "0.3.9", :require => nil
+gem "capybara", "1.1.2", :require => nil
gem "timecop", "0.3.5"
-gem "mongrel", "1.2.0.pre2"
gem "cgi_multipart_eof_fix"
gem "fastthread"
gem "pry"
View
80 Gemfile.lock
@@ -1,10 +1,3 @@
-GIT
- remote: git://github.com/cavalle/steak.git
- revision: 36a26d1f87a537a8e504aad72d3f628badcfce46
- specs:
- steak (1.1.0)
- rspec (>= 1.3)
-
GEM
remote: http://rubygems.org/
specs:
@@ -35,34 +28,32 @@ GEM
activesupport (3.2.7)
i18n (~> 0.6)
multi_json (~> 1.0)
+ addressable (2.3.2)
arel (3.0.2)
bson (1.2.4)
bson_ext (1.2.4)
builder (3.0.3)
- capybara (0.3.9)
- culerity (>= 0.2.4)
+ capybara (1.1.2)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
- selenium-webdriver (>= 0.0.3)
+ selenium-webdriver (~> 2.0)
+ xpath (~> 0.1.4)
cgi_multipart_eof_fix (2.5.0)
- childprocess (0.1.7)
- ffi (~> 0.6.3)
+ childprocess (0.3.5)
+ ffi (~> 1.0, >= 1.0.6)
coderay (1.0.8)
- culerity (0.2.15)
- daemons (1.0.10)
- diff-lcs (1.1.2)
+ diff-lcs (1.1.3)
erubis (2.7.0)
fastthread (1.0.7)
- ffi (0.6.3)
- rake (>= 0.8.7)
- gem_plugin (0.2.3)
+ ffi (1.1.5)
hike (1.2.1)
i18n (0.6.0)
journey (1.0.4)
json (1.7.5)
- json_pure (1.5.1)
+ libwebsocket (0.1.5)
+ addressable
mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
@@ -71,11 +62,8 @@ GEM
mime-types (1.19)
mongo (1.1)
bson (>= 1.0.5)
- mongrel (1.2.0.pre2)
- daemons (~> 1.0.10)
- gem_plugin (~> 0.2.3)
multi_json (1.3.6)
- nokogiri (1.4.4)
+ nokogiri (1.5.5)
polyglot (0.3.3)
pry (0.9.10)
coderay (~> 1.0.5)
@@ -107,24 +95,24 @@ GEM
rdoc (3.12)
json (~> 1.4)
redis (2.1.1)
- rspec (2.5.0)
- rspec-core (~> 2.5.0)
- rspec-expectations (~> 2.5.0)
- rspec-mocks (~> 2.5.0)
- rspec-core (2.5.1)
- rspec-expectations (2.5.0)
- diff-lcs (~> 1.1.2)
- rspec-mocks (2.5.0)
- rspec-rails (2.5.0)
- actionpack (~> 3.0)
- activesupport (~> 3.0)
- railties (~> 3.0)
- rspec (~> 2.5.0)
- rubyzip (0.9.4)
- selenium-webdriver (0.1.3)
- childprocess (~> 0.1.5)
- ffi (~> 0.6.3)
- json_pure
+ rspec (2.11.0)
+ rspec-core (~> 2.11.0)
+ rspec-expectations (~> 2.11.0)
+ rspec-mocks (~> 2.11.0)
+ rspec-core (2.11.1)
+ rspec-expectations (2.11.3)
+ diff-lcs (~> 1.1.3)
+ rspec-mocks (2.11.3)
+ rspec-rails (2.11.0)
+ actionpack (>= 3.0)
+ activesupport (>= 3.0)
+ railties (>= 3.0)
+ rspec (~> 2.11.0)
+ rubyzip (0.9.9)
+ selenium-webdriver (2.25.0)
+ childprocess (>= 0.2.5)
+ libwebsocket (~> 0.1.3)
+ multi_json (~> 1.0)
rubyzip
slop (3.3.3)
sprockets (2.1.3)
@@ -138,24 +126,24 @@ GEM
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.33)
+ xpath (0.1.4)
+ nokogiri (~> 1.3)
yajl-ruby (1.1.0)
PLATFORMS
ruby
DEPENDENCIES
bson_ext (>= 1.0.5)
- capybara (= 0.3.9)
+ capybara (= 1.1.2)
cgi_multipart_eof_fix
- diff-lcs (= 1.1.2)
+ diff-lcs (= 1.1.3)
fastthread
i18n (= 0.6.0)
mongo (= 1.1)
- mongrel (= 1.2.0.pre2)
pry
rails (= 3.2.7)
redis
- rspec-rails
- steak!
+ rspec-rails (>= 2.10.1)
timecop (= 0.3.5)
yajl-ruby
View
3 spec/acceptance/acceptance_helper.rb
@@ -1,11 +1,10 @@
require File.dirname(__FILE__) + "/../spec_helper"
-require "steak"
require 'capybara/rails'
Capybara.default_driver = :selenium
RSpec.configure do |config|
- config.include Capybara
+ config.include Capybara::DSL
end
RSpec.configuration.include Capybara, :type => :acceptance
View
6 spec/acceptance/support/helpers.rb
@@ -1,5 +1,5 @@
-module HelperMethods
- # Put helper methods you need to be available in all tests here.
+# Put helper methods you need to be available in all tests here.
+def translations_path
+ '/translations'
end
-RSpec.configuration.include HelperMethods, :type => :acceptance
View
13 spec/acceptance/support/paths.rb
@@ -1,13 +0,0 @@
-module NavigationHelpers
- # Put helper methods related to the paths in your application here.
-
- def homepage(locale = nil)
- "/#{"?locale=#{locale}" if locale}"
- end
-
- def translate
- "/site_translations"
- end
-end
-
-RSpec.configuration.include NavigationHelpers, :type => :acceptance
View
18 spec/acceptance/translations_management.rb
@@ -2,7 +2,7 @@
#
shared_examples_for "translations_management" do
scenario "see translations keys specified in main language yaml file" do
- page.should have_content "hello.world"
+ page.should have_content "Date > Formats > Default"
end
scenario "see translations provided in language files" do
@@ -13,6 +13,7 @@
end
scenario "editing translations" do
+ visit translations_path + "/?utf8=✓&search=&key=&group=application&translated=&commit=Submit"
within :css, "#pl-hello-world" do
fill_in "value", :with => "Elo ziomy"
click_button "Save"
@@ -29,16 +30,17 @@
page.should have_content("Elo ziomy")
end
- scenario "see only app translations by default, Rails ones after changing tab" do
- page.should_not have_content("date.formats")
- click_link "Framework Translations"
- page.should have_content("date.formats")
+ scenario "see only all translations by default, app ones after selecting from dropdown" do
+ page.should have_content("Date > Formats")
+ select "Application", from: "group"
+ click_button "Submit"
+ page.should_not have_content("Date > Formats")
+ page.should have_content("World")
end
scenario "paginate translations, 50 on every page" do
- click_link "Framework Translations"
- page.should_not have_content("helpers.submit.submit")
+ page.should have_content("Date > Formats")
click_link "2"
- page.should have_content("helpers.submit.submit")
+ page.should_not have_content("Date > Formats")
end
end
View
4 spec/unit/translator_spec.rb
@@ -7,9 +7,9 @@
I18n.backend = Translator.setup_backend(I18n::Backend::Simple.new)
end
- it "should list non-framework keys by default" do
+ it "should list all keys by default" do
Translator.keys_for_strings.should include("hello.world")
- Translator.keys_for_strings.should_not include("helpers.submit.update")
+ Translator.keys_for_strings.should include("helpers.submit.update")
end
it "should list only keys that their values are Strings in Yaml files" do

0 comments on commit 9a10e28

Please sign in to comment.