Skip to content

Commit

Permalink
RSpec config.expose_dsl_globally = false support
Browse files Browse the repository at this point in the history
Also resolves #148
  • Loading branch information
glebm committed Jul 30, 2015
1 parent 20bab5b commit 2bee3dc
Show file tree
Hide file tree
Showing 19 changed files with 19 additions and 18 deletions.
2 changes: 1 addition & 1 deletion i18n-tasks.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ TEXT
s.add_development_dependency 'axlsx', '~> 2.0'
s.add_development_dependency 'bundler', '~> 1.3'
s.add_development_dependency 'rake'
s.add_development_dependency 'rspec', '~> 3.0'
s.add_development_dependency 'rspec', '~> 3.3'
s.add_development_dependency 'yard'
end
2 changes: 1 addition & 1 deletion spec/commands/data_commands_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'spec_helper'

describe 'Data commands' do
RSpec.describe 'Data commands' do
delegate :run_cmd, to: :TestCodebase
def en_data
{'en' => {'a' => '1', 'common' => {'hello' => 'Hello'}}}
Expand Down
2 changes: 1 addition & 1 deletion spec/commands/tree_commands_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'spec_helper'

describe 'Tree commands' do
RSpec.describe 'Tree commands' do
delegate :run_cmd, to: :TestCodebase
before do
TestCodebase.setup
Expand Down
2 changes: 1 addition & 1 deletion spec/conservative_router_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8
require 'spec_helper'

describe 'Conservative router' do
RSpec.describe 'Conservative router' do
describe '#available_locales' do
before do
TestCodebase.setup(
Expand Down
2 changes: 1 addition & 1 deletion spec/file_system_data_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8
require 'spec_helper'

describe 'File system i18n' do
RSpec.describe 'File system i18n' do
describe '#available_locales' do
before do
TestCodebase.setup(
Expand Down
2 changes: 1 addition & 1 deletion spec/google_translate_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require 'spec_helper'
require 'i18n/tasks/commands'

describe 'Google Translation' do
RSpec.describe 'Google Translation' do
include I18n::Tasks::GoogleTranslation

tests = [
Expand Down
2 changes: 1 addition & 1 deletion spec/i18n_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'i18n/tasks'

describe 'I18n' do
RSpec.describe 'I18n' do
let(:i18n) { I18n::Tasks::BaseTask.new }
let(:missing_keys) { i18n.missing_keys }
let(:unused_keys) { i18n.unused_keys }
Expand Down
2 changes: 1 addition & 1 deletion spec/i18n_tasks_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
require 'open3'

# Integration tests
describe 'i18n-tasks' do
RSpec.describe 'i18n-tasks' do
delegate :run_cmd, :run_cmd_capture_stderr, :i18n_task, :in_test_app_dir, to: :TestCodebase

describe 'bin/i18n-tasks' do
Expand Down
2 changes: 1 addition & 1 deletion spec/key_pattern_matching_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8
require 'spec_helper'

describe 'Key pattern' do
RSpec.describe 'Key pattern' do
include I18n::Tasks::KeyPatternMatching
describe 'matching' do
describe '*' do
Expand Down
2 changes: 1 addition & 1 deletion spec/locale_pathname_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'spec_helper'

describe 'LocalePathname' do
RSpec.describe 'LocalePathname' do
include ::I18n::Tasks::LocalePathname
context '#replace_locale' do

Expand Down
2 changes: 1 addition & 1 deletion spec/locale_tree/siblings_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8
require 'spec_helper'

describe 'Tree siblings / forest' do
RSpec.describe 'Tree siblings / forest' do

context 'Node' do
it '::new with children' do
Expand Down
2 changes: 1 addition & 1 deletion spec/pattern_scanner_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8
require 'spec_helper'

describe 'Pattern Scanner' do
RSpec.describe 'Pattern Scanner' do
describe 'scan_file' do
it 'returns absolute keys from controllers' do
file_path = 'spec/fixtures/app/controllers/events_controller.rb'
Expand Down
2 changes: 1 addition & 1 deletion spec/plural_keys_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8
require 'spec_helper'

describe 'Plural keys' do
RSpec.describe 'Plural keys' do
let(:task) { ::I18n::Tasks::BaseTask.new }
before do
TestCodebase.setup('config/locales/en.yml' => '')
Expand Down
2 changes: 1 addition & 1 deletion spec/readme_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding: utf-8

describe 'README.md' do
RSpec.describe 'README.md' do
let(:readme) { File.read('README.md', encoding: 'UTF-8') }
it 'has valid YAML in ```yaml blocks' do
readme.scan /```yaml\n(.*)(?=^)\n```/ do |m|
Expand Down
2 changes: 1 addition & 1 deletion spec/relative_keys_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding: utf-8
require 'spec_helper'
describe 'Relative keys' do
RSpec.describe 'Relative keys' do
let(:scanner) { I18n::Tasks::Scanners::BaseScanner.new }

describe 'absolutize_key' do
Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
Dir['spec/support/**/*.rb'].each { |f| require "./#{f}" }

RSpec.configure do |config|
config.expose_dsl_globally = false
config.include FixturesSupport
config.include CaptureStd
config.include Trees
Expand Down
2 changes: 1 addition & 1 deletion spec/split_key_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'spec_helper'

describe 'SplitKey' do
RSpec.describe 'SplitKey' do
include ::I18n::Tasks::SplitKey

[['', %w()],
Expand Down
2 changes: 1 addition & 1 deletion spec/used_keys_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8
require 'spec_helper'

describe 'UsedKeys' do
RSpec.describe 'UsedKeys' do
let!(:task) { I18n::Tasks::BaseTask.new }
let(:file_name) { 'a.html.slim' }
let(:file_content) do
Expand Down
2 changes: 1 addition & 1 deletion templates/rspec/i18n_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'i18n/tasks'

describe 'I18n' do
RSpec.describe 'I18n' do
let(:i18n) { I18n::Tasks::BaseTask.new }
let(:missing_keys) { i18n.missing_keys }
let(:unused_keys) { i18n.unused_keys }
Expand Down

0 comments on commit 2bee3dc

Please sign in to comment.