Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stubbing
- ----------------
- subject = TranscodeResolution.new(content_id: "content_stub_id", source_files: source_files, resolutions: resolutions )
- subject.stubs(:analyze_sources).returns(["1280x720", "480x360"])
- subject.perform
- ---------------
- class TranscodeResolution
- def initialize(content_id:, source_files:, resolutions: [], preserve_aspect_ratio: 'true')
- @content_id = content_id
- @source_files = source_files
- end
- def perform
- if !@resolutions.empty?
- binding.pry
- existing_resolutions = analyze_sources
- end
- end
- private
- def analyze_sources
- puts "do stuff"
- end
- end
- -------------
- [1] pry(#<TranscodeResolution>)> analyze_sources
- => nil
- [2] pry(#<TranscodeResolution>)> analyze_sources
- => ["1280x720", "480x360"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement