mongoid-tags-arent-hard 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,7 @@ module Mongoid
4
4
 
5
5
  attr_accessor :tag_list
6
6
  attr_accessor :options
7
- delegate :join, :map, :each, :inspect, :==, :===, :eql?, :__bson_dump__, :delete, :&, :to_ary, to: :tag_list
7
+ delegate :join, :map, :each, :inspect, :==, :===, :eql?, :__bson_dump__, :delete, :&, :to_ary, :to_json, to: :tag_list
8
8
 
9
9
  def initialize(*tag_list, options)
10
10
  self.options = {separator: Mongoid::TagsArentHard.config.separator}.merge(options)
@@ -2,7 +2,7 @@ module Mongoid
2
2
  module Tags
3
3
  module Arent
4
4
  module Hard
5
- VERSION = "1.0.1"
5
+ VERSION = "1.0.2"
6
6
  end
7
7
  end
8
8
  end
@@ -63,4 +63,12 @@ describe Mongoid::TagsArentHard::Tags do
63
63
 
64
64
  end
65
65
 
66
+ describe 'to_json' do
67
+
68
+ it "returns an Array style json" do
69
+ tags.to_json.should eql("[\"foo\",\"bar\",\"baz\"]")
70
+ end
71
+
72
+ end
73
+
66
74
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-tags-arent-hard
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: