锘??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美激情偷拍自拍,自拍偷拍精品,1024视频在线http://www.aygfsteel.com/huaoguo/category/43062.htmlmy wayzh-cnFri, 11 Dec 2009 18:14:32 GMTFri, 11 Dec 2009 18:14:32 GMT60璁㏑spec鏀寔涓枃http://www.aygfsteel.com/huaoguo/archive/2009/12/12/305670.htmlhuaoguohuaoguoFri, 11 Dec 2009 17:47:00 GMThttp://www.aygfsteel.com/huaoguo/archive/2009/12/12/305670.htmlhttp://www.aygfsteel.com/huaoguo/comments/305670.htmlhttp://www.aygfsteel.com/huaoguo/archive/2009/12/12/305670.html#Feedback0http://www.aygfsteel.com/huaoguo/comments/commentRss/305670.htmlhttp://www.aygfsteel.com/huaoguo/services/trackbacks/305670.html
# author: Percival  date: 12/06/09
# Have a good day!


require 'clazz'

describe Clazz 
do
  before(
:eachdo
    
@clazz = Clazz.new
  end

  it 
"蹇呴』鑳藉瀛樺偍鍜岃緗被鍚?/span>" do

  end

  it 
"蹇呴』灝嗗畠瀹炵幇鐨勬帴鍙e瓨鍌ㄥ湪涓涓泦鍚堥噷" do

  end

  it 
"蹇呴』鏈変竴涓泦鍚堢敤鏉ュ瓨鍌ㄩ渶瑕佸鍏ョ殑綾?/span>" do

  end

  it 
"蹇呴』瀵瑰鎻愪緵鎷ユ湁鐨勬墍鏈夋柟娉曟帴鍙?/span>" do

  end

  it 
"蹇呴』鑳藉浠庝竴涓枃浠朵腑瀵煎叆綾諱俊鎭?/span>" do
    
  end

end

闇瑕佷慨鏀?lib/spec/example/example_proxy.rb涓猴細
require 'iconv' #璁ヾescribe鏀寔涓枃 鈥斺擯ercival

module Spec
  module Example
    
# Lightweight proxy for an example. This is the object that is passed to
    # example-related methods in Spec::Runner::Formatter::BaseFormatter

    class ExampleProxy

      def initialize(description
=nil, options={}, location=nil) # :nodoc:
        #璁ヾescribe鏀寔涓枃 鈥斺擯ercival

        description = Iconv.iconv("GBK","UTF-8",description)
        
@description, @options, @location = description, options, location
      end

      
# Optional hash passed to the example declaration
      attr_reader :options

      
# This is the docstring passed to the <tt>it()</tt> method or any
      # of its aliases

      attr_reader :description

      
# The file and line number at which the represented example
      # was declared. This is extracted from <tt>caller</tt>, and is therefore
      # formatted as an individual line in a backtrace.

      attr_reader :location

      
# Deprecated - use location()
      def backtrace
        Spec
.deprecate("ExampleProxy#backtrace","ExampleProxy#location")
        location
      end

      
# Convenience method for example group - updates the value of
      # <tt>description</tt> and returns self.

      def update(description) # :nodoc:
        @description = description
        self
      end

      def 
==(other) # :nodoc:
        (other.description == description) & (other.location == location)
      end
    end
  end
end

鐒跺悗璁﹕hould鍜宻hould_not鏀寔涓枃錛屼慨鏀筶ib\spec\expectations\handler.rb:
require 'iconv'

module Spec
  module Expectations
    class InvalidMatcherError 
< ArgumentError; end        
    
    class PositiveExpectationHandler        
      def self
.handle_matcher(actual, matcher, message=nil, &block)
        
#璁﹕hould鏀寔涓枃
        if(actual.instance_of? String)
          actual 
= Iconv.iconv("UTF-8","GBK",actual).first
        end
        
::Spec::Matchers.last_should = :should
        
::Spec::Matchers.last_matcher = matcher
        
return ::Spec::Matchers::PositiveOperatorMatcher.new(actual) if matcher.nil?

        match 
= matcher.matches?(actual, &block)
        
return match if match
        
        message 
||= matcher.respond_to?(:failure_message_for_should) ?
                    matcher
.failure_message_for_should :
                    matcher
.failure_message
        
        
if matcher.respond_to?(:diffable?&& matcher.diffable?
          
::Spec::Expectations.fail_with message, matcher.expected.first, matcher.actual
        
else
          
::Spec::Expectations.fail_with message
        end
      end
    end

    class NegativeExpectationHandler
      def self
.handle_matcher(actual, matcher, message=nil, &block)
        
#璁﹕hould鏀寔涓枃
        if(actual.instance_of? String)
          actual 
= Iconv.iconv("UTF-8","GBK",actual).first
        end
        
::Spec::Matchers.last_should = :should_not
        
::Spec::Matchers.last_matcher = matcher
        
return ::Spec::Matchers::NegativeOperatorMatcher.new(actual) if matcher.nil?
        
        match 
= matcher.respond_to?(:does_not_match??
                
!matcher.does_not_match?(actual, &block) :
                matcher
.matches?(actual, &block)
        
return match unless match
        
        message 
||= matcher.respond_to?(:failure_message_for_should_not) ?
                    matcher
.failure_message_for_should_not :
                    matcher
.negative_failure_message

        
if matcher.respond_to?(:diffable?&& matcher.diffable?
          
::Spec::Expectations.fail_with message, matcher.expected.first, matcher.actual
        
else
          
::Spec::Expectations.fail_with message
        end
      end
    end
  end
end

鏆傛椂鎴戝彧鐢ㄥ埌榪欎簺鍏冪礌錛屽彲鑳借繕涓嶅叏闈紝鏈夐亣鍒伴棶棰樼殑鍐嶅姞涓娿?br />

huaoguo 2009-12-12 01:47 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 宁南县| 如皋市| 阿拉善左旗| 徐汇区| 巨鹿县| 普格县| 海盐县| 冕宁县| 佛学| 鹤山市| 五家渠市| 仪征市| 凤山县| 巫溪县| 灵台县| 福贡县| 淳化县| 潮安县| 枣庄市| 巴林右旗| 博客| 陵水| 都匀市| 会同县| 北安市| 应用必备| 横山县| 宁海县| 贡觉县| 东台市| 南丹县| 元江| 崇明县| 新田县| 汽车| 博客| 邢台市| 山东| 四子王旗| 吉安县| 中方县|