From 039b0c4800808bf0b3740eb521d6f0257e3567f5 Mon Sep 17 00:00:00 2001 From: Pavel Date: Mon, 23 Jan 2012 14:50:36 +0800 Subject: [PATCH] tests fix --- Gemfile.rails-3.2 | 2 +- spec/action_view_spec.rb | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Gemfile.rails-3.2 b/Gemfile.rails-3.2 index b229a59..69f490a 100644 --- a/Gemfile.rails-3.2 +++ b/Gemfile.rails-3.2 @@ -1,5 +1,5 @@ source :rubygems gemspec -gem "rails", "3.2.0.rc2" +gem "rails", "3.2.0" gem "mida", git: 'git://github.com/Paxa/mida.git', ref: '7db7149a2cf' gem 'chronic_duration', git: 'git://github.com/Paxa/chronic_duration.git', ref: '8c0d0e101b' \ No newline at end of file diff --git a/spec/action_view_spec.rb b/spec/action_view_spec.rb index fd5dcbd..e4fc80f 100644 --- a/spec/action_view_spec.rb +++ b/spec/action_view_spec.rb @@ -12,12 +12,14 @@ str.should =~ %r{link.+href="/stylesheets/application.css.*"} end - it "should work with data- attributes and nested hashes" do - str = render_haml('= link_to "An", ?#, data: data_hash', data_hash: {a: 1, b: '2', c: 0.111}).gsub(?', ?") + if Rails.version =~ /^3\.[12].*/ + it "should work with data- attributes and nested hashes" do + str = render_haml('= link_to "An", ?#, data: data_hash', data_hash: {a: 1, b: '2', c: 0.111}).gsub(?', ?") - str.should =~ /data\-a="1"/ - str.should =~ /data\-b="2"/ - str.should =~ /data\-c="0.111"/ + str.should =~ /data\-a="1"/ + str.should =~ /data\-b="2"/ + str.should =~ /data\-c="0.111"/ + end end it "should make itemscope as boolean attribute" do