Projects
openEuler:24.03:SP1:Everything
rubygem-rspec2-core
_service:tar_scm:rubygem-rspec-core-2.14.8-remo...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:rubygem-rspec-core-2.14.8-remove-aruba-dependency.patch of Package rubygem-rspec2-core
--- rspec-core-2.14.8/spec/spec_helper.rb.aruba 2017-02-17 16:22:33.309398987 +0900 +++ rspec-core-2.14.8/spec/spec_helper.rb 2017-02-17 18:53:34.740609923 +0900 @@ -17,7 +17,7 @@ Spork.prefork do require 'rspec/autorun' require 'autotest/rspec2' - require 'aruba/api' + #require 'aruba/api' if RUBY_PLATFORM == 'java' # Works around https://jira.codehaus.org/browse/JRUBY-5678 @@ -96,14 +96,53 @@ end end + # bollowed from Aruba 0.6.2 + class RSpec::Core::ExampleGroup + def write_file(file_name, file_content) + _create_file(file_name, file_content, false) + end + + def current_dir + #File.join(*dirs) + # Fixme + "tmp/aruba" + end + + def in_current_dir(&block) + _mkdir(current_dir) + Dir.chdir(current_dir, &block) + end + + def _create_file(file_name, file_content, check_presence) + in_current_dir do + file_name = File.expand_path(file_name) + + raise "expected #{file_name} to be present" if check_presence && !File.file?(file_name) + + _mkdir(File.dirname(file_name)) + File.open(file_name, 'w') { |f| f << file_content } + end + + self + end + + def _mkdir(dir_name) + dir_name = File.expand_path(dir_name) + + FileUtils.mkdir_p(dir_name) unless File.directory?(dir_name) + end + end + RSpec.configure do |c| # structural c.alias_it_behaves_like_to 'it_has_behavior' c.around {|example| Sandboxing.sandboxed { example.run }} c.include(RSpecHelpers) + ''' c.include Aruba::Api, :example_group => { :file_path => /spec\/command_line/ } + ''' c.expect_with :rspec do |expectations| expectations.syntax = :expect
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2