web_translate_it 1.10.2 → 2.0.0.rc2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/history.md +13 -0
- data/lib/web_translate_it.rb +2 -0
- data/lib/web_translate_it/string.rb +197 -33
- data/lib/web_translate_it/term.rb +175 -29
- data/lib/web_translate_it/term_translation.rb +68 -14
- data/lib/web_translate_it/translation.rb +46 -24
- data/lib/web_translate_it/util.rb +1 -2
- data/lib/web_translate_it/util/hash_util.rb +24 -4
- data/readme.md +20 -22
- data/spec/web_translate_it/string_spec.rb +127 -0
- data/spec/web_translate_it/term_spec.rb +114 -0
- data/version +1 -0
- metadata +94 -81
- data/spec/web_translate_it/configuration_spec.rb +0 -60
- data/spec/web_translate_it/translation_file_spec.rb +0 -52
- data/spec/web_translate_it/util_spec.rb +0 -10
- data/spec/web_translate_it_spec.rb +0 -26
- data/version.yml +0 -4
@@ -1,26 +0,0 @@
|
|
1
|
-
require File.expand_path('../spec_helper', __FILE__)
|
2
|
-
|
3
|
-
module WebTranslateIt
|
4
|
-
class I18n
|
5
|
-
end
|
6
|
-
end
|
7
|
-
|
8
|
-
describe WebTranslateIt do
|
9
|
-
|
10
|
-
before(:each) do
|
11
|
-
WebTranslateIt::I18n.stub(:locale => 'en')
|
12
|
-
WebTranslateIt::Configuration::Rails = OpenStruct.new(:root => Pathname.new(File.dirname(__FILE__) + "/examples"))
|
13
|
-
@configuration = WebTranslateIt::Configuration.new
|
14
|
-
@file = mock(WebTranslateIt::TranslationFile)
|
15
|
-
@file.stub(:fetch => true, :locale => true)
|
16
|
-
@configuration.stub(:files => [@file])
|
17
|
-
WebTranslateIt::Configuration.stub(:new => @configuration)
|
18
|
-
end
|
19
|
-
|
20
|
-
describe "WebTranslateIt.fetch_translations" do
|
21
|
-
it "should fetch the configuration" do
|
22
|
-
WebTranslateIt::Configuration.should_receive(:new)
|
23
|
-
WebTranslateIt.fetch_translations
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
data/version.yml
DELETED