Sha256: 3a4b23892fc63bcd375e36ca965463abe3e6df8a67979f214d03b6424d90ff24
Contents?: true
Size: 1.11 KB
Versions: 1
Compression:
Stored size: 1.11 KB
Contents
require "spec_helper" module Fx::CommandRecorder describe Arguments do describe "#function" do it "returns the function name" do raw_args = [:spaceships, {foo: :bar}] args = Arguments.new(raw_args) expect(args.function).to eq :spaceships end end describe "#revert_to_version" do it "is the revert_to_version from the keyword arguments" do raw_args = [:spaceships, {revert_to_version: 42}] args = Arguments.new(raw_args) expect(args.revert_to_version).to eq 42 end it "is nil if the revert_to_version was not supplied" do raw_args = [:spaceships, {foo: :bar}] args = Arguments.new(raw_args) expect(args.revert_to_version).to be nil end end describe "#invert_version" do it "returns object with version set to revert_to_version" do raw_args = [:meatballs, {version: 42, revert_to_version: 15}] inverted_args = Arguments.new(raw_args).invert_version expect(inverted_args.version).to eq 15 expect(inverted_args.revert_to_version).to be nil end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fx-0.8.0 | spec/fx/command_recorder/arguments_spec.rb |