@@ -644,97 +644,6 @@ module RubyEventStore
644644 specify { expect ( specification . result . frozen? ) . to be ( true ) }
645645 specify { expect ( specification . backward . result . frozen? ) . to be ( true ) }
646646
647- specify "#hash" do
648- expect ( specification . result . hash ) . to eq ( specification . forward . result . hash )
649- expect ( specification . forward . result . hash ) . not_to eq ( specification . backward . result . hash )
650-
651- expect ( specification . read_first . result . hash ) . to eq ( specification . read_first . result . hash )
652- expect ( specification . read_last . result . hash ) . to eq ( specification . read_last . result . hash )
653- expect ( specification . read_first . result . hash ) . not_to eq ( specification . read_last . result . hash )
654-
655- expect ( specification . result . hash ) . not_to eq ( specification . limit ( 10 ) . result . hash )
656- expect ( specification . in_batches . result . hash ) . to eq (
657- specification . in_batches ( Specification ::DEFAULT_BATCH_SIZE ) . result . hash ,
658- )
659- expect ( specification . in_batches . result . hash ) . not_to eq ( specification . in_batches ( 10 ) . result . hash )
660- expect ( specification . result . hash ) . to eq ( specification . stream ( GLOBAL_STREAM ) . result . hash )
661- expect ( specification . result . hash ) . not_to eq ( specification . stream ( "dummy" ) . result . hash )
662-
663- expect ( specification . with_id ( event_id ) . result . hash ) . to eq ( specification . with_id ( event_id ) . result . hash )
664- expect ( specification . with_id ( event_id ) . result . hash ) . not_to eq (
665- specification . with_id ( SecureRandom . uuid ) . result . hash ,
666- )
667-
668- expect ( specification . of_type ( [ TestEvent ] ) . result . hash ) . to eq ( specification . of_type ( [ TestEvent ] ) . result . hash )
669- expect ( specification . of_type ( [ TestEvent ] ) . result . hash ) . not_to eq (
670- specification . of_type ( [ OrderCreated ] ) . result . hash ,
671- )
672-
673- expect ( specification . result . hash ) . not_to eq ( specification . as_at . result . hash )
674- expect ( specification . result . hash ) . not_to eq ( specification . as_of . result . hash )
675- expect ( specification . as_at . result . hash ) . not_to eq ( specification . as_of . result . hash )
676-
677- with_event_of_id ( event_id ) do
678- expect ( specification . from ( event_id ) . result . hash ) . not_to eq ( specification . result . hash )
679- expect ( specification . to ( event_id ) . result . hash ) . not_to eq ( specification . result . hash )
680- end
681-
682- expect ( specification . older_than ( target_date ) . result . hash ) . not_to eq ( specification . result . hash )
683- expect ( specification . older_than_or_equal ( target_date ) . result . hash ) . not_to eq ( specification . result . hash )
684- expect ( specification . newer_than ( target_date ) . result . hash ) . not_to eq ( specification . result . hash )
685- expect ( specification . newer_than_or_equal ( target_date ) . result . hash ) . not_to eq ( specification . result . hash )
686-
687- expect ( specification . result . hash ) . not_to eq (
688- [
689- SpecificationResult ,
690- :forward ,
691- nil ,
692- nil ,
693- nil ,
694- nil ,
695- nil ,
696- nil ,
697- nil ,
698- Float ::INFINITY ,
699- Stream . new ( GLOBAL_STREAM ) ,
700- :all ,
701- Specification ::DEFAULT_BATCH_SIZE ,
702- nil ,
703- nil ,
704- ] . hash ,
705- )
706-
707- expect ( Class . new ( SpecificationResult ) . new . hash ) . not_to eq ( specification . result . hash )
708- end
709-
710- specify "#eql?" do
711- expect ( specification . result ) . to eq ( specification . forward . result )
712- expect ( specification . forward . result ) . not_to eq ( specification . backward . result )
713-
714- expect ( specification . read_first . result ) . to eq ( specification . read_first . result )
715- expect ( specification . read_last . result ) . to eq ( specification . read_last . result )
716- expect ( specification . read_first . result ) . not_to eq ( specification . read_last . result )
717-
718- expect ( specification . result ) . not_to eq ( specification . limit ( 10 ) . result )
719- expect ( specification . in_batches . result ) . to eq ( specification . in_batches ( Specification ::DEFAULT_BATCH_SIZE ) . result )
720- expect ( specification . in_batches . result ) . not_to eq ( specification . in_batches ( 10 ) . result )
721- expect ( specification . result ) . to eq ( specification . stream ( GLOBAL_STREAM ) . result )
722- expect ( specification . result ) . not_to eq ( specification . stream ( "dummy" ) . result )
723-
724- expect ( specification . with_id ( event_id ) . result ) . to eq ( specification . with_id ( event_id ) . result )
725- expect ( specification . with_id ( event_id ) . result ) . not_to eq ( specification . with_id ( SecureRandom . uuid ) . result )
726-
727- with_event_of_id ( event_id ) do
728- expect ( specification . from ( event_id ) . result ) . not_to eq ( specification . result )
729- expect ( specification . older_than ( target_date ) . result ) . not_to eq ( specification . result )
730- end
731- end
732-
733- specify "#dup" do
734- expect ( specification . result . dup ) . to eq ( specification . result )
735- specification . result . dup { |result | expect ( result . object_id ) . not_to eq ( specification . result . object_id ) }
736- end
737-
738647 specify "#count" do
739648 expect ( specification . count ) . to eq ( 0 )
740649 ( 1 ..3 ) . each { repository . append_to_stream ( [ test_record ] , Stream . new ( stream_name ) , ExpectedVersion . any ) }
0 commit comments