Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Small refactoring in features helpers.

  • Loading branch information...
commit 10934d5819fb49c9364d573f20748c223bebfb4d 1 parent 374cc72
@luislavena luislavena authored
View
11 features/step_definitions/cross_compilation.rb
@@ -13,18 +13,11 @@
File.exist? File.join(path, comp)
end
end
- raise "Cannot locate '#{compiler}' in the PATH." unless compiler
+ pending "Cannot locate suitable compiler in the PATH." unless compiler
end
Then /^binaries for platform '(.*)' get generated$/ do |platform|
- ext = case platform
- when /darwin/
- 'bundle'
- when /mingw|mswin|linux/
- 'so'
- else
- RbConfig::CONFIG['DLEXT']
- end
+ ext = binary_extension(platform)
ext_for_platform = Dir.glob("tmp/#{platform}/**/*.#{ext}")
ext_for_platform.should_not be_empty
View
14 features/support/platform_extension_helpers.rb
@@ -0,0 +1,14 @@
+module PlatformExtensionHelpers
+ def binary_extension(platform = RUBY_PLATFORM)
+ case platform
+ when /darwin/
+ 'bundle'
+ when /mingw|mswin|linux/
+ 'so'
+ else
+ RbConfig::CONFIG['DLEXT']
+ end
+ end
+end
+
+World(PlatformExtensionHelpers)
Please sign in to comment.
Something went wrong with that request. Please try again.