Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added test #46

Open
wants to merge 2 commits into
base: shopify-core-version
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ dependencies:
- git submodule sync
- git submodule update --init --recursive || (rm -fr .git/config .git/modules && git submodule deinit -f . && git submodule update --init --recursive)
post:
- bundle exec rake compile
- bundle exec rake
1 change: 0 additions & 1 deletion dev.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: enterprise-script-service

up:
- xcode_clt
- ruby:
package: shopify/shopify/shopify-ruby
version: 2.2.3p172-shopify
Expand Down
13 changes: 13 additions & 0 deletions spec/script_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,24 @@
],
timeout: 1000,
)
expect(result.errors).to eq([])
expect(result.success?).to be(true)
expect(result.output).to eq([26803196617, 0.475])
expect(result.stdout).to eq("hello")
end

it "breaks out of a proc just fine" do
result = EnterpriseScriptService.run(
input: {},
sources: [
["proc", "[1, 2].each { |i| break }"],
],
timeout: 1000,
)
expect(result.errors).to eq([])
expect(result.success?).to be(true)
end

it "round trips binary strings" do
result = EnterpriseScriptService.run(
input: "hello".force_encoding(Encoding::BINARY),
Expand Down