spec/serializer_spec.rb in cuba-api-0.1.0 vs spec/serializer_spec.rb in cuba-api-0.2.0
- old
+ new
@@ -1,6 +1,7 @@
require 'spec_helper'
+require 'cuba_api/config'
require 'cuba_api/write_aspect'
require 'cuba_api/serializer'
require 'yaml'
require 'ixtlan/babel/serializer'
@@ -19,10 +20,11 @@
describe CubaApi::Serializer do
before do
Cuba.reset!
+ Cuba.plugin CubaApi::Config
Cuba[ :aspects ] = []
Cuba.plugin CubaApi::WriteAspect
Cuba.plugin CubaApi::Serializer
Cuba.plugin ToYaml
Cuba.append_aspect :to_yaml
@@ -32,11 +34,12 @@
end
end
end
it 'should write out yaml' do
+ skip("to_yaml add extra line with ...") if defined?( JRUBY_VERSION ) and (( JRUBY_VERSION =~ /^1.6./ ) == 0 ) and ( nil == (RUBY_VERSION =~ /^1.8/) )
_, _, resp = Cuba.call({})
-
+
resp[ 0 ] = resp[ 0 ].sub(/.*\n/, "---\n")
resp.must_equal ["---\nname: me and the corner\n"]
end
end