features/rails.feature in copy_tuner_client-0.1.1.beta11 vs features/rails.feature in copy_tuner_client-0.1.1.beta12
- old
+ new
@@ -27,10 +27,11 @@
And I wait for changes to be synchronized
Then the copy_tuner client version and environment should have been logged
Then the log should contain "Downloaded translations"
When I visit /users/
Then the response should contain "This is a test"
+ And I wait for changes to be synchronized
And the log should not contain "DEPRECATION WARNING"
Scenario: copy_tuner in the view
Given the "abc123" project has the following blurbs:
| key | draft content |
@@ -69,15 +70,18 @@
And I write to "app/views/users/index.html.erb" with:
"""
<%= @text %>
"""
When I start the application
+ And I wait for changes to be synchronized
And I visit /users/
Then the response should contain "Old content"
+ And I wait for changes to be synchronized
When the the following blurbs are updated in the "abc123" project:
| key | draft content |
| en.users.index.controller-test | New content |
+ And I wait for changes to be synchronized
And I visit /users/
Then the response should contain "New content"
Scenario: missing key
When I write to "app/controllers/users_controller.rb" with:
@@ -92,12 +96,14 @@
And I write to "app/views/users/index.html.erb" with:
"""
<%= t(".404", :default => "not found") %>
"""
When I start the application
+ And I wait for changes to be synchronized
And I visit /users/
Then the response should contain "not found"
+ And I wait for changes to be synchronized
And the "abc123" project should have the following blurbs:
| key | draft content |
| en.users.index.404 | not found |
And the log should contain "Uploaded missing translations"
@@ -142,11 +148,13 @@
Given the "abc123" project has the following blurbs:
| key | draft content | published content |
| test.one | expected one | unexpected one |
| test.two | expected two | unexpected two |
When I successfully rake "copy_tuner:deploy"
+ And I wait for changes to be synchronized
And the output should contain "Successfully marked all blurbs as published"
+ And I wait for changes to be synchronized
Then the "abc123" project should have the following blurbs:
| key | draft content | published content |
| test.one | expected one | expected one |
| test.two | expected two | expected two |
@@ -165,10 +173,11 @@
end
end
"""
When I route the "users" resource
And I start the application
+ And I wait for changes to be synchronized
And I visit /users/
Then the response should contain "Hello, Joe"
When I wait for changes to be synchronized
Then the "abc123" project should have the following blurbs:
| key | draft content |
@@ -187,10 +196,11 @@
And I write to "app/views/users/index.html.erb" with:
"""
<%= number_to_currency(2.5) %>
"""
When I start the application
+ And I wait for changes to be synchronized
And I visit /users/
Then the response should contain "$2.50"
When I wait for changes to be synchronized
Then the "abc123" project should not have the "en.number.format" blurb
@@ -224,24 +234,27 @@
When I route the "users" resource
And I write to "app/views/users/index.html.erb" with:
"""
<%= @user.errors.full_messages.first %>
"""
- When I successfully rake "db:migrate"
+ When I successfully rake "db:migrate RAILS_ENV=development"
And I configure the copy_tuner client to use published data
And I start the application
+ And I wait for changes to be synchronized
And I visit /users/
Then the response should contain "Name can't be blank"
When I wait for changes to be synchronized
Then the "abc123" project should have the following error blurbs:
| key | draft content |
| user.attributes.name.blank | can't be blank |
Scenario: ensure keys are synced with short lived processes
When I configure the copy_tuner client to have a polling delay of 86400 seconds
And I start the application
- And I run a short lived process that sets the key "threaded.key" to "all your base"
+ And I wait for changes to be synchronized
+ And I run a short lived process that sets the key "threaded.key" to "all your base" in "development" environment
+ And I wait for changes to be synchronized
Then the "abc123" project should have the following blurbs:
| key | draft content |
| en.threaded.key | all your base |
Scenario: support pluralization
@@ -258,9 +271,10 @@
"""
<%= time_ago_in_words(1.hour.ago) %> ago
<%= time_ago_in_words(2.hours.ago) %> ago
"""
When I start the application
+ And I wait for changes to be synchronized
And I visit /users/
Then the response should contain "1 hour ago"
And the response should contain "2 hours ago"
When I wait for changes to be synchronized
Then the "abc123" project should have the following blurbs: