[DRE-commits] [ruby-fast-gettext] 03/05: fix tests with ruby calls

Dmitry Borodaenko angdraug at moszumanska.debian.org
Sat Oct 18 20:00:06 UTC 2014


This is an automated email from the git hooks/post-receive script.

angdraug pushed a commit to branch patch-queue/master
in repository ruby-fast-gettext.

commit 10c443e4480a9f20f99244a45dc114ecec3544a2
Author: Antonio Terceiro <terceiro at debian.org>
Date:   Sat Jun 30 13:28:02 2012 -0300

    fix tests with ruby calls
---
 spec/fast_gettext/vendor/iconv_spec.rb  | 4 +++-
 spec/fast_gettext/vendor/string_spec.rb | 5 +++--
 spec/spec_helper.rb                     | 1 +
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/spec/fast_gettext/vendor/iconv_spec.rb b/spec/fast_gettext/vendor/iconv_spec.rb
index 4d6b8f6..ed793d1 100644
--- a/spec/fast_gettext/vendor/iconv_spec.rb
+++ b/spec/fast_gettext/vendor/iconv_spec.rb
@@ -1,7 +1,9 @@
 require "spec_helper"
 
 describe 'Iconv' do
+  let(:ruby) { File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name']) }
+
   it "also works when Iconv was not found locally" do
-    system("bundle exec ruby spec/cases/iconv_fallback.rb").should == true
+    system("#{ruby} spec/cases/iconv_fallback.rb").should == true
   end
 end
diff --git a/spec/fast_gettext/vendor/string_spec.rb b/spec/fast_gettext/vendor/string_spec.rb
index 1c55ef6..3969528 100644
--- a/spec/fast_gettext/vendor/string_spec.rb
+++ b/spec/fast_gettext/vendor/string_spec.rb
@@ -85,16 +85,17 @@ describe String do
 
   describe 'with i18n loaded' do
     let(:pending_condition) { (RUBY_VERSION < "1.9" and ActiveRecord::VERSION::MAJOR == 3) or (ActiveRecord::VERSION::MAJOR == 4 and ActiveRecord::VERSION::MINOR == 0)}
+    let(:ruby) { File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name']) }
 
     it "interpolates if i18n is loaded before" do
       pending_if pending_condition, "does not work on ree + rails 3 or rails 4"  do
-        system("bundle exec ruby spec/cases/interpolate_i18n_before_fast_gettext.rb  > /dev/null 2>&1").should == true
+        system("#{ruby} spec/cases/interpolate_i18n_before_fast_gettext.rb  > /dev/null 2>&1").should == true
       end
     end
 
     it "interpolates if i18n is loaded before" do
       pending_if pending_condition, "does not work on ree + rails 3 or rails 4"  do
-        system("bundle exec ruby spec/cases/interpolate_i18n_after_fast_gettext.rb > /dev/null 2>&1").should == true
+        system("#{ruby} spec/cases/interpolate_i18n_after_fast_gettext.rb > /dev/null 2>&1").should == true
       end
     end
   end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index f2cc4a5..1052b1d 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -4,6 +4,7 @@
 require 'rspec'
 require 'fast_gettext'
 require 'active_record'
+require 'rbconfig'
 
 # ---- revert to defaults
 RSpec.configure do |config|

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-fast-gettext.git



More information about the Pkg-ruby-extras-commits mailing list