[DRE-commits] [ruby-roxml] 01/01: add patch for basic RSpec3 support

Cédric Boutillier boutil at moszumanska.debian.org
Wed Aug 12 13:29:06 UTC 2015


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

boutil pushed a commit to branch master
in repository ruby-roxml.

commit 9e64a042ee6a7af131f4ee8eeb8741673e055fb4
Author: Cédric Boutillier <boutil at debian.org>
Date:   Wed Aug 12 15:28:56 2015 +0200

    add patch for basic RSpec3 support
---
 debian/patches/rspec3.patch | 212 ++++++++++++++++++++++++++++++++++++++++++++
 debian/patches/series       |   1 +
 2 files changed, 213 insertions(+)

diff --git a/debian/patches/rspec3.patch b/debian/patches/rspec3.patch
new file mode 100644
index 0000000..df6c113
--- /dev/null
+++ b/debian/patches/rspec3.patch
@@ -0,0 +1,212 @@
+Description: Basic RSpec3 support
+Author: Cédric Boutillier <boutil at debian.org>
+Bug-Debian: http://bugs.debian.org/795048
+Bug: https://github.com/Empact/roxml/issues/50
+Last-Update: 2015-08-12
+
+
+--- a/spec/roxml_spec.rb
++++ b/spec/roxml_spec.rb
+@@ -194,11 +194,11 @@
+ 
+     describe "indirect reference via an object" do
+       it "does not inherit the frozen status from its parent" do
+-        @frozen.writable.frozen?.should be_false
+-        @frozen.readonly.frozen?.should be_true
++        @frozen.writable.frozen?.should be false
++        @frozen.readonly.frozen?.should be true
+ 
+-        @unfrozen.writable.frozen?.should be_false
+-        @unfrozen.readonly.frozen?.should be_true
++        @unfrozen.writable.frozen?.should be false
++        @unfrozen.readonly.frozen?.should be true
+       end
+     end
+   end
+@@ -212,8 +212,8 @@
+     it_should_behave_like "freezable xml reference"
+ 
+     it "should apply :frozen to the constituent elements" do
+-      @frozen.all?(&:frozen?).should be_true
+-      @unfrozen.any?(&:frozen?).should be_false
++      @frozen.all?(&:frozen?).should be true
++      @unfrozen.any?(&:frozen?).should be false
+     end
+ 
+     context "no elements are present in root, no :in is specified" do
+@@ -267,13 +267,13 @@
+     it_should_behave_like "freezable xml reference"
+ 
+     it "should have frozen keys, as with all hashes" do
+-      @frozen.keys.all?(&:frozen?).should be_true
+-      @unfrozen.keys.all?(&:frozen?).should be_true
++      @frozen.keys.all?(&:frozen?).should be true
++      @unfrozen.keys.all?(&:frozen?).should be true
+     end
+ 
+     it "should apply :frozen to the constituent values" do
+-      @frozen.values.all?(&:frozen?).should be_true
+-      @unfrozen.values.any?(&:frozen?).should be_false
++      @frozen.values.all?(&:frozen?).should be true
++      @unfrozen.values.any?(&:frozen?).should be false
+     end
+   end
+ end
+--- a/spec/shared_specs.rb
++++ b/spec/shared_specs.rb
+@@ -2,13 +2,13 @@
+   shared_examples_for "freezable xml reference" do
+     describe "with :frozen option" do
+       it "should be frozen" do
+-        @frozen.frozen?.should be_true
++        @frozen.frozen?.should be true
+       end
+     end
+ 
+     describe "without :frozen option" do
+       it "should not be frozen" do
+-        @unfrozen.frozen?.should be_false
++        @unfrozen.frozen?.should be false
+       end
+     end
+   end
+--- a/spec/definition_spec.rb
++++ b/spec/definition_spec.rb
+@@ -4,13 +4,13 @@
+ describe ROXML::Definition do
+   describe "#name_explicit?" do
+     it "should indicate whether from option is present" do
+-      ROXML::Definition.new(:element, :from => 'somewhere').name_explicit?.should be_true
+-      ROXML::Definition.new(:element).name_explicit?.should be_false
++      ROXML::Definition.new(:element, :from => 'somewhere').name_explicit?.should be true
++      ROXML::Definition.new(:element).name_explicit?.should be false
+     end
+ 
+     it "should not consider name proxies as explicit" do
+-      ROXML::Definition.new(:element, :from => :attr).name_explicit?.should be_false
+-      ROXML::Definition.new(:element, :from => :content).name_explicit?.should be_false
++      ROXML::Definition.new(:element, :from => :attr).name_explicit?.should be false
++      ROXML::Definition.new(:element, :from => :content).name_explicit?.should be false
+     end
+   end
+ 
+@@ -87,7 +87,7 @@
+     describe "=> []" do
+       it "should means array of texts" do
+         opts = ROXML::Definition.new(:authors, :as => [])
+-        opts.array?.should be_true
++        opts.array?.should be true
+         opts.sought_type.should == :text
+       end
+     end
+@@ -131,7 +131,7 @@
+     describe "=> {}" do
+       shared_examples_for "hash options declaration" do
+         it "should represent a hash" do
+-          @opts.hash?.should be_true
++          @opts.hash?.should be true
+         end
+ 
+         it "should have hash definition" do
+@@ -140,7 +140,7 @@
+         end
+ 
+         it "should not represent an array" do
+-          @opts.array?.should be_false
++          @opts.array?.should be false
+         end
+       end
+ 
+@@ -193,7 +193,7 @@
+         end
+ 
+         it "should be detected as array reference" do
+-          @opts.array?.should be_true
++          @opts.array?.should be true
+         end
+ 
+         it "should be normal otherwise" do
+@@ -325,16 +325,16 @@
+ 
+       describe ":bool" do
+         it "should boolify individual values" do
+-          ROXML::Definition.new(:floatvalue, :as => :bool).blocks.first.call("1").should be_true
+-          ROXML::Definition.new(:floatvalue, :as => :bool).blocks.first.call("True").should be_true
+-          ROXML::Definition.new(:floatvalue, :as => :bool).blocks.first.call("Yes").should be_true
++          ROXML::Definition.new(:floatvalue, :as => :bool).blocks.first.call("1").should be true
++          ROXML::Definition.new(:floatvalue, :as => :bool).blocks.first.call("True").should be true
++          ROXML::Definition.new(:floatvalue, :as => :bool).blocks.first.call("Yes").should be true
+         end
+ 
+         context "when an array is passed in" do
+           it "should boolify arrays of values" do
+-            ROXML::Definition.new(:floatvalue, :as => :bool).blocks.first.call("0").should be_false
+-            ROXML::Definition.new(:floatvalue, :as => :bool).blocks.first.call("false").should be_false
+-            ROXML::Definition.new(:floatvalue, :as => :bool).blocks.first.call("nO").should be_false
++            ROXML::Definition.new(:floatvalue, :as => :bool).blocks.first.call("0").should be false
++            ROXML::Definition.new(:floatvalue, :as => :bool).blocks.first.call("false").should be false
++            ROXML::Definition.new(:floatvalue, :as => :bool).blocks.first.call("nO").should be false
+           end
+         end
+ 
+@@ -425,7 +425,7 @@
+ 
+     describe ":content" do
+       it "should be recognized" do
+-        ROXML::Definition.new(:author).content?.should be_false
++        ROXML::Definition.new(:author).content?.should be false
+         ROXML::Definition.new(:author, :from => :content).content?.should == true
+       end
+ 
+@@ -454,12 +454,12 @@
+     shared_examples_for "boolean option" do
+       it "should be recognized" do
+         ROXML::Definition.new(:author, :from => :content, @option => true).respond_to?(:"#{@option}?")
+-        ROXML::Definition.new(:author, :from => :content, @option => true).send(:"#{@option}?").should be_true
+-        ROXML::Definition.new(:author, :from => :content, @option => false).send(:"#{@option}?").should be_false
++        ROXML::Definition.new(:author, :from => :content, @option => true).send(:"#{@option}?").should be true
++        ROXML::Definition.new(:author, :from => :content, @option => false).send(:"#{@option}?").should be false
+       end
+ 
+       it "should default to false" do
+-        ROXML::Definition.new(:author, :from => :content).send(:"#{@option}?").should be_false
++        ROXML::Definition.new(:author, :from => :content).send(:"#{@option}?").should be false
+       end
+     end
+ 
+--- a/spec/examples/active_record_spec.rb
++++ b/spec/examples/active_record_spec.rb
+@@ -25,7 +25,7 @@
+ 
+   describe "xml sub-objects" do
+     it "should extract xml sub-objects" do
+-      @route.should have(6).waypoints
++      expect(@route.waypoints.size).to eq 6
+       @route.waypoints.each {|waypoint| waypoint.should be_an_instance_of(Waypoint)}
+     end
+     it "should be usable as a ActiveRecord object" do
+@@ -34,4 +34,4 @@
+       Waypoint.count.should == 6
+     end
+   end
+-end
+\ No newline at end of file
++end
+--- a/spec/xml/attributes_spec.rb
++++ b/spec/xml/attributes_spec.rb
+@@ -56,7 +56,7 @@
+       end
+ 
+       it "should collect all instances" do
+-        pending "Test bug?"
++        skip "Test bug?"
+         @ref.value_in(@xml).should == ["first", "second", "third"]
+       end
+ 
+@@ -68,4 +68,4 @@
+       end
+     end
+   end
+-end
+\ No newline at end of file
++end
diff --git a/debian/patches/series b/debian/patches/series
index 52a2fb8..d6b3e5b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ require-system-roxml.patch
 require-rspec.patch
 use_moved_VERSION.patch
 remove_rubygems_from_tests.patch
+rspec3.patch

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



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